diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-06-12 08:28:48 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-06-14 13:54:08 -0400 |
commit | bc2df47a408f2d64cf81bcfd0f6e3e14c84cb0ab (patch) | |
tree | 6c5c72d2498fd2003ab9499d1a9859480dd067b1 /fs/nfsd/nfs4state.c | |
parent | 12918b10d59e975fd5241eef03ef9e6d5ea3dcfe (diff) |
nfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels
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: stable@kernel.org
Cc: Benny Halevy <bhalevy@tonian.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-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 8fdc9ec5c5d3..94effd5bc4a1 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -900,7 +900,7 @@ static void free_session(struct kref *kref) | |||
900 | struct nfsd4_session *ses; | 900 | struct nfsd4_session *ses; |
901 | int mem; | 901 | int mem; |
902 | 902 | ||
903 | BUG_ON(!spin_is_locked(&client_lock)); | 903 | lockdep_assert_held(&client_lock); |
904 | ses = container_of(kref, struct nfsd4_session, se_ref); | 904 | ses = container_of(kref, struct nfsd4_session, se_ref); |
905 | nfsd4_del_conns(ses); | 905 | nfsd4_del_conns(ses); |
906 | spin_lock(&nfsd_drc_lock); | 906 | spin_lock(&nfsd_drc_lock); |
@@ -1080,7 +1080,7 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name) | |||
1080 | static inline void | 1080 | static inline void |
1081 | free_client(struct nfs4_client *clp) | 1081 | free_client(struct nfs4_client *clp) |
1082 | { | 1082 | { |
1083 | BUG_ON(!spin_is_locked(&client_lock)); | 1083 | lockdep_assert_held(&client_lock); |
1084 | while (!list_empty(&clp->cl_sessions)) { | 1084 | while (!list_empty(&clp->cl_sessions)) { |
1085 | struct nfsd4_session *ses; | 1085 | struct nfsd4_session *ses; |
1086 | ses = list_entry(clp->cl_sessions.next, struct nfsd4_session, | 1086 | ses = list_entry(clp->cl_sessions.next, struct nfsd4_session, |