summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2010-10-26 18:25:30 -0400
committerArnd Bergmann <arnd@arndb.de>2010-10-27 21:39:50 +0200
commita282a1fa6b23bd21ba0b86e53ed2a316b001836f (patch)
tree8fbd81efed26f13fd53be66804065639ee71a89f /fs
parent763641d81202834e9d64de2019d1edec12868f4f (diff)
downloadlinux-3.10-a282a1fa6b23bd21ba0b86e53ed2a316b001836f.tar.gz
linux-3.10-a282a1fa6b23bd21ba0b86e53ed2a316b001836f.tar.bz2
linux-3.10-a282a1fa6b23bd21ba0b86e53ed2a316b001836f.zip
lockd: fix nlmsvc_notify_blocked locking
nlmsvc_notify_blocked walks the nlm_blocked list, which requires nlm_blocked_lock. Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/lockd/svclock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 6f1ef000975..c462d346acb 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -700,14 +700,16 @@ nlmsvc_notify_blocked(struct file_lock *fl)
struct nlm_block *block;
dprintk("lockd: VFS unblock notification for block %p\n", fl);
+ spin_lock(&nlm_blocked_lock);
list_for_each_entry(block, &nlm_blocked, b_list) {
if (nlm_compare_locks(&block->b_call->a_args.lock.fl, fl)) {
- nlmsvc_insert_block(block, 0);
+ nlmsvc_insert_block_locked(block, 0);
+ spin_unlock(&nlm_blocked_lock);
svc_wake_up(block->b_daemon);
return;
}
}
-
+ spin_unlock(&nlm_blocked_lock);
printk(KERN_WARNING "lockd: notification for unknown block!\n");
}