projects/linux·commit 266ae4e6

Merge tag 'writeback-lock-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux

266ae4e6 · Linus Torvalds <[email protected]> · 2012-06-12 18:28:58 +03:00

Pull writeback locking fix from Wu Fengguang:
 "fix unbalanced wb->list_lock in 3.5-rc1"

* tag 'writeback-lock-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
  writeback: Fix lock imbalance in writeback_sb_inodes()
Commit
266ae4e6155419b3904f45b132db26d4b6fdceaf
Parents
7452ca51 · ead188f9

Merge commit. Changes below are compared with the first parent: 7452ca51.

Changes

1 files changed · +1 −0

FileStatusAddDelContent
fs/fs-writeback.cmodified+1−0View file

fs/fs-writeback.c

View file
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 8d2fb8c..41a3ccf 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -664,6 +664,7 @@ static long writeback_sb_inodes(struct super_block *sb,
/* Wait for I_SYNC. This function drops i_lock... */
inode_sleep_on_writeback(inode);
/* Inode may be gone, start again */
+ spin_lock(&wb->list_lock);
continue;
}
inode->i_state |= I_SYNC;