summaryrefslogtreecommitdiffstats
path: root/fs/stack.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-05-03 14:48:00 +0200
committerFengguang Wu <fengguang.wu@intel.com>2012-05-06 13:43:40 +0800
commit4f8ad655dbc82cf05d2edc11e66b78a42d38bf93 (patch)
treea2692bde34b45857e14c05c10c61e33763ac1bde /fs/stack.c
parentf0d07b7ffde758a27a48509ceda9a9ef413e0ea0 (diff)
downloadlinux-4f8ad655dbc82cf05d2edc11e66b78a42d38bf93.tar.bz2
writeback: Refactor writeback_single_inode()
The code in writeback_single_inode() is relatively complex. The list requeing logic makes sense only for flusher thread but not really for sync_inode() or write_inode_now() callers. Also when we want to get rid of inode references held by flusher thread, we will need a special I_SYNC handling there. So separate part of writeback_single_inode() which does the real writeback work into __writeback_single_inode() and make writeback_single_inode() do only stuff necessary for callers writing only one inode, moving the special list handling into writeback_sb_inodes(). As a sideeffect this fixes a possible race where we could skip some inode during sync(2) because other writer refiled it from b_io to b_dirty list. Also I_SYNC handling is moved into the callers of __writeback_single_inode() to make locking easier. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Diffstat (limited to 'fs/stack.c')
0 files changed, 0 insertions, 0 deletions