writeback: use unlocked_inode_to_wb transaction in inode_congested()
authorTejun Heo <tj@kernel.org>
Thu, 28 May 2015 18:50:54 +0000 (14:50 -0400)
committerJens Axboe <axboe@fb.com>
Tue, 2 Jun 2015 14:40:20 +0000 (08:40 -0600)
commit5cb8b8241e6146c487ca715551ac3a5e80358585
tree54faea693b6f741a59ade1b639c40e7ff892b4d2
parent682aa8e1a6a1504a4caaa62e6c2c9daae3757210
writeback: use unlocked_inode_to_wb transaction in inode_congested()

Similar to wb stat updates, inode_congested() accesses the associated
wb of an inode locklessly, which will break with foreign inode wb
switching.  This path updates inode_congested() to use unlocked inode
wb access transaction introduced by the previous patch.

Combined with the previous two patches, this makes all wb list and
access operations to be protected by either of inode->i_lock,
wb->list_lock, or mapping->tree_lock while wb switching is in
progress.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jan Kara <jack@suse.cz>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Greg Thelen <gthelen@google.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/fs-writeback.c