]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
nfsd4: make sure sequence flags are set after destroy_session
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 9 Dec 2010 20:52:19 +0000 (15:52 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 11 Jan 2011 20:04:11 +0000 (15:04 -0500)
If this loses any backchannel, make sure we have a chance to notice that
and set the sequence flags.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4callback.c
fs/nfsd/nfs4state.c
fs/nfsd/state.h

index d32f49d6ca2ce1482efbe2d94fd590dac04e45ea..cb002dce56308d918c879888b2178684640e5c90 100644 (file)
@@ -589,6 +589,12 @@ void nfsd4_probe_callback(struct nfs4_client *clp)
        do_probe_callback(clp);
 }
 
+void nfsd4_probe_callback_sync(struct nfs4_client *clp)
+{
+       nfsd4_probe_callback(clp);
+       flush_workqueue(callback_wq);
+}
+
 void nfsd4_change_callback(struct nfs4_client *clp, struct nfs4_cb_conn *conn)
 {
        clp->cl_cb_state = NFSD4_CB_UNKNOWN;
index b24f19d4187a7d7808fb41bfac1d8a3b742d254d..00a50b8ac8785a3e519313d337ebcc20ed02b826 100644 (file)
@@ -1686,8 +1686,7 @@ nfsd4_destroy_session(struct svc_rqst *r,
        spin_unlock(&client_lock);
 
        nfs4_lock_state();
-       /* wait for callbacks */
-       nfsd4_shutdown_callback(ses->se_client);
+       nfsd4_probe_callback_sync(ses->se_client);
        nfs4_unlock_state();
 
        nfsd4_del_conns(ses);
index 32ff615c36f473324610fb71bb00aa8ac04cad0d..4e5bdfd9169c2c288fa123c7540658119eef8299 100644 (file)
@@ -464,6 +464,7 @@ extern __be32 nfs4_check_open_reclaim(clientid_t *clid);
 extern void nfs4_free_stateowner(struct kref *kref);
 extern int set_callback_cred(void);
 extern void nfsd4_probe_callback(struct nfs4_client *clp);
+extern void nfsd4_probe_callback_sync(struct nfs4_client *clp);
 extern void nfsd4_change_callback(struct nfs4_client *clp, struct nfs4_cb_conn *);
 extern void nfsd4_do_callback_rpc(struct work_struct *);
 extern void nfsd4_cb_recall(struct nfs4_delegation *dp);