fs: use mapping_set_error instead of opencoded set_bit

The mapping_set_error() helper sets the correct AS_ flag for the mapping
so there is no reason to open code it.  Use the helper directly.

[akpm@linux-foundation.org: be honest about conversion from -ENXIO to -EIO]
Link: http://lkml.kernel.org/r/20160912111608.2588-2-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tento commit je obsažen v:
Michal Hocko
2016-10-11 13:56:01 -07:00
odevzdal Linus Torvalds
rodič 97139d4a6f
revize 5114a97a8b
7 změnil soubory, kde provedl 9 přidání a 14 odebrání

Zobrazit soubor

@@ -88,7 +88,7 @@ static void ext4_finish_bio(struct bio *bio)
if (bio->bi_error) {
SetPageError(page);
set_bit(AS_EIO, &page->mapping->flags);
mapping_set_error(page->mapping, -EIO);
}
bh = head = page_buffers(page);
/*