diff --git a/fs/buffer.c b/fs/buffer.c index 3b12cf947aba1e3516a6072584bf29d9d4e28fe1..665db84a1f9febadd9c71a9179aefe124a858424 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2917,7 +2917,7 @@ drop_buffers(struct page *page, struct buffer_head **buffers_to_free) bh = head; do { - if (buffer_write_io_error(bh)) + if (buffer_write_io_error(bh) && page->mapping) set_bit(AS_EIO, &page->mapping->flags); if (buffer_busy(bh)) goto failed;