aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorAlexandros Batsakis <batsakis@netapp.com>2008-12-18 22:55:16 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-03-18 17:30:50 -0400
commite37da04ed145d45c2a698d7cb373a7e1191fbe86 (patch)
treed493557917d982e1b6fa5141779ba3984f1706d9 /fs/nfsd
parent6c02eaa1d1e53b9b2cc27d0c6fff3e57da4b611f (diff)
nfsd: lock state around put client and delegation in nfsd4_cb_recall
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>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4callback.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index c6804db33c17..3ddc9fb2e358 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -451,7 +451,6 @@ nfsd4_probe_callback(struct nfs4_client *clp)
451 451
452/* 452/*
453 * called with dp->dl_count inc'ed. 453 * called with dp->dl_count inc'ed.
454 * nfs4_lock_state() may or may not have been called.
455 */ 454 */
456void 455void
457nfsd4_cb_recall(struct nfs4_delegation *dp) 456nfsd4_cb_recall(struct nfs4_delegation *dp)
@@ -491,7 +490,9 @@ out_put_cred:
491 * Success or failure, now we're either waiting for lease expiration 490 * Success or failure, now we're either waiting for lease expiration
492 * or deleg_return. 491 * or deleg_return.
493 */ 492 */
493 nfs4_lock_state();
494 put_nfs4_client(clp); 494 put_nfs4_client(clp);
495 nfs4_put_delegation(dp); 495 nfs4_put_delegation(dp);
496 nfs4_unlock_state();
496 return; 497 return;
497} 498}