diff options
author | Jan Kara <jack@suse.cz> | 2012-05-03 12:48:00 (GMT) |
---|---|---|
committer | Fengguang Wu <fengguang.wu@intel.com> | 2012-05-06 05:43:40 (GMT) |
commit | 4f8ad655dbc82cf05d2edc11e66b78a42d38bf93 (patch) | |
tree | a2692bde34b45857e14c05c10c61e33763ac1bde /fs/configfs/dir.c | |
parent | f0d07b7ffde758a27a48509ceda9a9ef413e0ea0 (diff) | |
download | linux-fsl-qoriq-4f8ad655dbc82cf05d2edc11e66b78a42d38bf93.tar.xz |
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/configfs/dir.c')
0 files changed, 0 insertions, 0 deletions