From 5364019193759010b5910897330f6f1ed5b58cc7 Mon Sep 17 00:00:00 2001 From: Nick Piggin Date: Fri, 29 Jan 2010 15:38:35 -0800 Subject: fs-fixes Signed-off-by: Nick Piggin Signed-off-by: John Stultz Signed-off-by: Thomas Gleixner --- fs/autofs4/root.c | 3 ++- fs/fs-writeback.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index 9e108ae491a8..f652c4cd583b 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c @@ -947,13 +947,14 @@ static int autofs4_dir_rmdir(struct inode *dir, struct dentry *dentry) return -EACCES; spin_lock(&autofs4_lock); + spin_lock(&sbi->lookup_lock); spin_lock(&dentry->d_lock); if (!list_empty(&dentry->d_subdirs)) { spin_unlock(&dentry->d_lock); + spin_unlock(&sbi->lookup_lock); spin_unlock(&autofs4_lock); return -ENOTEMPTY; } - spin_lock(&sbi->lookup_lock); if (list_empty(&ino->expiring)) list_add(&ino->expiring, &sbi->expiring_list); spin_unlock(&sbi->lookup_lock); diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 5fc0515a0e85..4682776308d9 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -650,8 +650,8 @@ again: } if (inode->i_state & (I_NEW | I_WILL_FREE)) { - spin_unlock(&inode->i_lock); requeue_io(inode); + spin_unlock(&inode->i_lock); continue; } @@ -665,8 +665,8 @@ again: } if (pin_sb_for_writeback(wbc, inode, &pin_sb)) { - spin_unlock(&inode->i_lock); requeue_io(inode); + spin_unlock(&inode->i_lock); continue; } @@ -817,6 +817,7 @@ retry: goto retry; } inode_wait_for_writeback(inode); + spin_unlock(&inode->i_lock); } spin_unlock(&wb_inode_list_lock); } -- cgit v1.2.3