diff options
author | J. Bruce Fields <bfields@redhat.com> | 2010-10-26 18:25:30 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2010-10-27 15:39:50 -0400 |
commit | a282a1fa6b23bd21ba0b86e53ed2a316b001836f (patch) | |
tree | 8fbd81efed26f13fd53be66804065639ee71a89f /fs/lockd/svclock.c | |
parent | 763641d81202834e9d64de2019d1edec12868f4f (diff) |
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/lockd/svclock.c')
-rw-r--r-- | fs/lockd/svclock.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 6f1ef000975a..c462d346acbd 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
@@ -700,14 +700,16 @@ nlmsvc_notify_blocked(struct file_lock *fl) | |||
700 | struct nlm_block *block; | 700 | struct nlm_block *block; |
701 | 701 | ||
702 | dprintk("lockd: VFS unblock notification for block %p\n", fl); | 702 | dprintk("lockd: VFS unblock notification for block %p\n", fl); |
703 | spin_lock(&nlm_blocked_lock); | ||
703 | list_for_each_entry(block, &nlm_blocked, b_list) { | 704 | list_for_each_entry(block, &nlm_blocked, b_list) { |
704 | if (nlm_compare_locks(&block->b_call->a_args.lock.fl, fl)) { | 705 | if (nlm_compare_locks(&block->b_call->a_args.lock.fl, fl)) { |
705 | nlmsvc_insert_block(block, 0); | 706 | nlmsvc_insert_block_locked(block, 0); |
707 | spin_unlock(&nlm_blocked_lock); | ||
706 | svc_wake_up(block->b_daemon); | 708 | svc_wake_up(block->b_daemon); |
707 | return; | 709 | return; |
708 | } | 710 | } |
709 | } | 711 | } |
710 | 712 | spin_unlock(&nlm_blocked_lock); | |
711 | printk(KERN_WARNING "lockd: notification for unknown block!\n"); | 713 | printk(KERN_WARNING "lockd: notification for unknown block!\n"); |
712 | } | 714 | } |
713 | 715 | ||