writeback: Move I_DIRTY_PAGES handling
authorJan Kara <jack@suse.cz>
Thu, 3 May 2012 12:47:57 +0000 (14:47 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 20 Feb 2015 00:49:23 +0000 (00:49 +0000)
commit4467c35fd9a2ee6086137460a6dce22bd06754e7
tree4fe06e8fbca477e633539648e762a397be33b5fa
parente12e49603beffe0924b14ca27681e16505318655
writeback: Move I_DIRTY_PAGES handling

commit 6290be1c1dc6589eeda213aa40946b27fa4faac8 upstream.

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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/fs-writeback.c