Skip to contentSkip to conversation

Patch "f2fs: don't need to call set_page_dirty for io error" has been added to the 4.5-stable tree

PATCH [email protected] 1 participant 1 message May 2, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

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

to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
f2fs-don-t-need-to-call-set_page_dirty-for-io-error.patch
and it can be found in the queue-4.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From e3ef18762f5757d3fb86f75ca59315db6d17d719 Mon Sep 17 00:00:00 2001

From: Jaegeuk Kim <[email protected]>
Date: Mon, 25 Jan 2016 14:31:58 -0800
Subject: f2fs: don't need to call set_page_dirty for io error

From: Jaegeuk Kim <[email protected]>

commit e3ef18762f5757d3fb86f75ca59315db6d17d719 upstream.

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){+.+...}

---
 fs/f2fs/data.c |    1 -
 1 file changed, 1 deletion(-)
fs/f2fs/data.c +0 -1
@@ -67,7 +67,6 @@ static void f2fs_write_end_io(struct bio
 		f2fs_restore_and_release_control_page(&page);
 
 		if (unlikely(bio->bi_error)) {
-			set_page_dirty(page);
 			set_bit(AS_EIO, &page->mapping->flags);
 			f2fs_stop_checkpoint(sbi);
 		}

Patches currently in stable-queue which might be from [email protected] are

queue-4.5/f2fs-cover-large-section-in-sanity-check-of-super.patch queue-4.5/f2fs-slightly-reorganize-read_raw_super_block.patch queue-4.5/f2fs-do-f2fs_balance_fs-when-block-is-allocated.patch queue-4.5/f2fs-don-t-need-to-call-set_page_dirty-for-io-error.patch queue-4.5/f2fs-crypto-handle-unexpected-lack-of-encryption-keys.patch queue-4.5/f2fs-crypto-fix-corrupted-symlink-in-encrypted-case.patch queue-4.5/f2fs-crypto-make-sure-the-encryption-info-is-initialized-on-opendir-2.patch queue-4.5/ext4-fscrypto-avoid-rcu-lookup-in-d_revalidate.patch