]> git.baikalelectronics.ru Git - kernel.git/commit
writeback: Move I_DIRTY_PAGES handling
authorJan Kara <jack@suse.cz>
Thu, 3 May 2012 12:47:57 +0000 (14:47 +0200)
committerFengguang Wu <fengguang.wu@intel.com>
Sun, 6 May 2012 05:43:39 +0000 (13:43 +0800)
commit0a57a4a866c745bcf2ca093758e56d4706ca9faa
tree5c7aa9510c3210775b948b578fa844cbfe399aa0
parent0ec9f96a4af8dc832903929abd3daafdc2dc6df6
writeback: Move I_DIRTY_PAGES handling

Instead of clearing I_DIRTY_PAGES and resetting it when we didn't succeed in
writing them all, just clear the bit only when we succeeded writing all the
pages. We also move the clearing of the bit close to other i_state handling to
separate it from writeback list handling. This is desirable because list
handling will differ for flusher thread and other writeback_single_inode()
callers in future. No filesystem plays any tricks with I_DIRTY_PAGES (like
checking it in ->writepages or ->write_inode implementation) so this movement
is safe.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
fs/fs-writeback.c