Commit e3ef1876 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: don't need to call set_page_dirty for io error

If end_io gets an error, we don't need to set the page as dirty, since we
already set f2fs_stop_checkpoint which will not flush any data.

This will resolve the following warning.

======================================================
[ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ]
4.4.0+ #9 Tainted: G           O
------------------------------------------------------
xfs_io/26773 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
 (&(&sbi->inode_lock[i])->rlock){+.+...}, at: [<ffffffffc025483f>] update_dirty_page+0x6f/0xd0 [f2fs]

and this task is already holding:
 (&(&q->__queue_lock)->rlock){-.-.-.}, at: [<ffffffff81396ea2>] blk_queue_bio+0x422/0x490
which would create a new lock dependency:
 (&(&q->__queue_lock)->rlock){-.-.-.} -> (&(&sbi->inode_lock[i])->rlock){+.+...}
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent ae96e7bd
...@@ -67,7 +67,6 @@ static void f2fs_write_end_io(struct bio *bio) ...@@ -67,7 +67,6 @@ static void f2fs_write_end_io(struct bio *bio)
f2fs_restore_and_release_control_page(&page); f2fs_restore_and_release_control_page(&page);
if (unlikely(bio->bi_error)) { if (unlikely(bio->bi_error)) {
set_page_dirty(page);
set_bit(AS_EIO, &page->mapping->flags); set_bit(AS_EIO, &page->mapping->flags);
f2fs_stop_checkpoint(sbi); f2fs_stop_checkpoint(sbi);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment