]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: move blocked lock handling under a dedicated spinlock
authorJeff Layton <jlayton@redhat.com>
Thu, 20 Oct 2016 13:34:31 +0000 (09:34 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 24 Oct 2016 20:51:21 +0000 (16:51 -0400)
commit4998cf3460a336ea7daaf7f185e9df0160d0cfa1
tree391b3b25eb0ac4780c5498f76fef1927f59fe907
parent71f83e9de55975751c0c82c8d8af1d67a9298d90
nfsd: move blocked lock handling under a dedicated spinlock

Bruce was hitting some lockdep warnings in testing, showing that we
could hit a deadlock with the new CB_NOTIFY_LOCK handling, involving a
rather complex situation involving four different spinlocks.

The crux of the matter is that we end up taking the nn->client_lock in
the lm_notify handler. The simplest fix is to just declare a new
per-nfsd_net spinlock to protect the new CB_NOTIFY_LOCK structures.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/netns.h
fs/nfsd/nfs4state.c