Skip to content

Commit

Permalink
nfsd: lock state around put client and delegation in nfsd4_cb_recall
Browse files Browse the repository at this point in the history
not having the state locked before putting the client/delegation causes a bug.
Also removed the comment from the function header about the state being already locked

Signed-off-by: Alexandros Batsakis <batsakis@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
Alexandros Batsakis authored and J. Bruce Fields committed Mar 18, 2009
1 parent 6c02eaa commit e37da04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ nfsd4_probe_callback(struct nfs4_client *clp)

/*
* called with dp->dl_count inc'ed.
* nfs4_lock_state() may or may not have been called.
*/
void
nfsd4_cb_recall(struct nfs4_delegation *dp)
Expand Down Expand Up @@ -491,7 +490,9 @@ nfsd4_cb_recall(struct nfs4_delegation *dp)
* Success or failure, now we're either waiting for lease expiration
* or deleg_return.
*/
nfs4_lock_state();
put_nfs4_client(clp);
nfs4_put_delegation(dp);
nfs4_unlock_state();
return;
}

0 comments on commit e37da04

Please sign in to comment.