aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fs-writeback.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r--fs/fs-writeback.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index efd1ebe879cc..5de56a2182bb 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -1123,7 +1123,7 @@ static void wait_sb_inodes(struct super_block *sb)
1123 */ 1123 */
1124 WARN_ON(!rwsem_is_locked(&sb->s_umount)); 1124 WARN_ON(!rwsem_is_locked(&sb->s_umount));
1125 1125
1126 spin_lock(&inode_lock); 1126 spin_lock(&inode_sb_list_lock);
1127 1127
1128 /* 1128 /*
1129 * Data integrity sync. Must wait for all pages under writeback, 1129 * Data integrity sync. Must wait for all pages under writeback,
@@ -1143,14 +1143,15 @@ static void wait_sb_inodes(struct super_block *sb)
1143 } 1143 }
1144 __iget(inode); 1144 __iget(inode);
1145 spin_unlock(&inode->i_lock); 1145 spin_unlock(&inode->i_lock);
1146 spin_unlock(&inode_lock); 1146 spin_unlock(&inode_sb_list_lock);
1147
1147 /* 1148 /*
1148 * We hold a reference to 'inode' so it couldn't have 1149 * We hold a reference to 'inode' so it couldn't have been
1149 * been removed from s_inodes list while we dropped the 1150 * removed from s_inodes list while we dropped the
1150 * inode_lock. We cannot iput the inode now as we can 1151 * inode_sb_list_lock. We cannot iput the inode now as we can
1151 * be holding the last reference and we cannot iput it 1152 * be holding the last reference and we cannot iput it under
1152 * under inode_lock. So we keep the reference and iput 1153 * inode_sb_list_lock. So we keep the reference and iput it
1153 * it later. 1154 * later.
1154 */ 1155 */
1155 iput(old_inode); 1156 iput(old_inode);
1156 old_inode = inode; 1157 old_inode = inode;
@@ -1159,9 +1160,9 @@ static void wait_sb_inodes(struct super_block *sb)
1159 1160
1160 cond_resched(); 1161 cond_resched();
1161 1162
1162 spin_lock(&inode_lock); 1163 spin_lock(&inode_sb_list_lock);
1163 } 1164 }
1164 spin_unlock(&inode_lock); 1165 spin_unlock(&inode_sb_list_lock);
1165 iput(old_inode); 1166 iput(old_inode);
1166} 1167}
1167 1168