From e37da04ed145d45c2a698d7cb373a7e1191fbe86 Mon Sep 17 00:00:00 2001 From: Alexandros Batsakis Date: Thu, 18 Dec 2008 19:55:16 -0800 Subject: 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 Signed-off-by: Benny Halevy Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4callback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/nfsd/nfs4callback.c') diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index c6804db33c1..3ddc9fb2e35 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -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) @@ -491,7 +490,9 @@ out_put_cred: * 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; } -- cgit v1.2.3