History

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".

J. Bruce Fields committed 14 years ago

Commit bc2df471 parent 12918b11 file · +2 −2Browse files

Unified · Split

fs/nfsd/nfs4state.c+2−2
@@ -900,7 +900,7 @@ static void free_session(struct kref *kref) · 899 unmodified lines
900900 struct nfsd4_session *ses;
901901 int mem;
902902
903− BUG_ON(!spin_is_locked(&client_lock));
903+ lockdep_assert_held(&client_lock);
904904 ses = container_of(kref, struct nfsd4_session, se_ref);
905905 nfsd4_del_conns(ses);
906906 spin_lock(&nfsd_drc_lock);
@@ -1080,7 +1080,7 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name) · 173 unmodified lines
10801080 static inline void
10811081 free_client(struct nfs4_client *clp)
10821082 {
1083− BUG_ON(!spin_is_locked(&client_lock));
1083+ lockdep_assert_held(&client_lock);
10841084 while (!list_empty(&clp->cl_sessions)) {
10851085 struct nfsd4_session *ses;
10861086 ses = list_entry(clp->cl_sessions.next, struct nfsd4_session,