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)
commit6290be1c1dc6589eeda213aa40946b27fa4faac8
tree5c7aa9510c3210775b948b578fa844cbfe399aa0
parentcc1676d917f32504dbadc858fa790bc524c9f0da
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