nfsd4: put_nfs4_client does not require state lock
authorJ. Bruce Fields <bfields@citi.umich.edu>
Sat, 21 Feb 2009 23:39:54 +0000 (15:39 -0800)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 18 Mar 2009 21:38:38 +0000 (17:38 -0400)
Since free_client() is guaranteed to only be called once, and to only
touch the client structure itself (not any common data structures), it
has no need for the state lock.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Alexandros Batsakis <batsakis@netapp.com>
fs/nfsd/nfs4callback.c

index 3ddc9fb2e358c15de1d31a9336089f6d7dddb153..3fd7136321ca4bbef84fdc93a46b74eb23dde27a 100644 (file)
@@ -490,8 +490,8 @@ 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_lock_state();
        nfs4_put_delegation(dp);
        nfs4_unlock_state();
        return;