diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-06-12 08:28:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-22 11:36:54 -0700 |
commit | d946d96cd89b13fc354b6f7ed2c4de3e72c87d8e (patch) | |
tree | 1755a0c65e7be1598a5e7ee7fbddee75ca4c335e | |
parent | 5e74cfe1feb56745cecce815adf6fd2c7dfb6a58 (diff) | |
download | linux-stable-d946d96cd89b13fc354b6f7ed2c4de3e72c87d8e.tar.gz linux-stable-d946d96cd89b13fc354b6f7ed2c4de3e72c87d8e.tar.bz2 linux-stable-d946d96cd89b13fc354b6f7ed2c4de3e72c87d8e.zip |
nfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels
commit bc2df47a408f2d64cf81bcfd0f6e3e14c84cb0ab upstream.
Most frequent symptom was a BUG triggering in expire_client, with the
server locking up shortly thereafter.
Introduced by 508dc6e110c6dbdc0bbe84298ccfe22de7538486 "nfsd41:
free_session/free_client must be called under the client_lock".
Cc: Benny Halevy <bhalevy@tonian.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/nfsd/nfs4state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 7f71c69cdcdf..e79c24e232f4 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -862,7 +862,7 @@ static void free_session(struct kref *kref) struct nfsd4_session *ses; int mem; - BUG_ON(!spin_is_locked(&client_lock)); + lockdep_assert_held(&client_lock); ses = container_of(kref, struct nfsd4_session, se_ref); nfsd4_del_conns(ses); spin_lock(&nfsd_drc_lock); @@ -1041,7 +1041,7 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name) static inline void free_client(struct nfs4_client *clp) { - BUG_ON(!spin_is_locked(&client_lock)); + lockdep_assert_held(&client_lock); while (!list_empty(&clp->cl_sessions)) { struct nfsd4_session *ses; ses = list_entry(clp->cl_sessions.next, struct nfsd4_session, |