nfsd4: shutdown callbacks on expiry
[safe/jmp/linux-2.6] / fs / nfsd / nfs4state.c
index efef7f2..9ce5831 100644 (file)
@@ -697,9 +697,6 @@ shutdown_callback_client(struct nfs4_client *clp)
 static inline void
 free_client(struct nfs4_client *clp)
 {
-       shutdown_callback_client(clp);
-       if (clp->cl_cb_xprt)
-               svc_xprt_put(clp->cl_cb_xprt);
        if (clp->cl_cred.cr_group_info)
                put_group_info(clp->cl_cred.cr_group_info);
        kfree(clp->cl_principal);
@@ -752,6 +749,9 @@ expire_client(struct nfs4_client *clp)
                                 se_perclnt);
                release_session(ses);
        }
+       shutdown_callback_client(clp);
+       if (clp->cl_cb_xprt)
+               svc_xprt_put(clp->cl_cb_xprt);
        put_nfs4_client(clp);
 }