aboutsummaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2011-03-22 07:23:41 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-03-24 21:17:51 -0400
commita66979abad090b2765a6c6790c9fdeab996833f2 (patch)
treee48b2d0fac8f96456286a503aeeb952620234961 /fs/block_dev.c
parent55fa6091d83160ca772fc37cebae45d42695a708 (diff)
fs: move i_wb_list out from under inode_lock
Protect the inode writeback list with a new global lock inode_wb_list_lock and use it to protect the list manipulations and traversals. This lock replaces the inode_lock as the inodes on the list can be validity checked while holding the inode->i_lock and hence the inode_lock is no longer needed to protect the list. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index bc39b18cf3d0..2bbc0e62102f 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -55,13 +55,13 @@ EXPORT_SYMBOL(I_BDEV);
55static void bdev_inode_switch_bdi(struct inode *inode, 55static void bdev_inode_switch_bdi(struct inode *inode,
56 struct backing_dev_info *dst) 56 struct backing_dev_info *dst)
57{ 57{
58 spin_lock(&inode_lock); 58 spin_lock(&inode_wb_list_lock);
59 spin_lock(&inode->i_lock); 59 spin_lock(&inode->i_lock);
60 inode->i_data.backing_dev_info = dst; 60 inode->i_data.backing_dev_info = dst;
61 if (inode->i_state & I_DIRTY) 61 if (inode->i_state & I_DIRTY)
62 list_move(&inode->i_wb_list, &dst->wb.b_dirty); 62 list_move(&inode->i_wb_list, &dst->wb.b_dirty);
63 spin_unlock(&inode->i_lock); 63 spin_unlock(&inode->i_lock);
64 spin_unlock(&inode_lock); 64 spin_unlock(&inode_wb_list_lock);
65} 65}
66 66
67static sector_t max_block(struct block_device *bdev) 67static sector_t max_block(struct block_device *bdev)