Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
nfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels
Browse files Browse the repository at this point in the history
commit bc2df47 upstream.

Most frequent symptom was a BUG triggering in expire_client, with the
server locking up shortly thereafter.

Introduced by 508dc6e "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>
  • Loading branch information
J. Bruce Fields authored and gregkh committed Jun 22, 2012
1 parent 5e74cfe commit d946d96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/nfsd/nfs4state.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit d946d96

Please sign in to comment.