diff options
author | Christoph Hellwig <hch@lst.de> | 2015-04-30 12:49:24 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2015-05-04 19:02:41 +0300 |
commit | cba5f62b1830c1919b47544789bc993e6e617dc6 (patch) | |
tree | 6f85f8982fe083ea576b7938799e56fe4d675bec /fs/nfsd/state.h | |
parent | ef2a1b3e1067195f1d6b89d8329454775c87f033 (diff) | |
download | linux-cba5f62b1830c1919b47544789bc993e6e617dc6.tar.xz |
nfsd: fix callback restarts
Checking the rpc_client pointer is not a reliable way to detect
backchannel changes: cl_cb_client is changed only after shutting down
the rpc client, so the condition cl_cb_client = tk_client will always be
true.
Check the RPC_TASK_KILLED flag instead, and rewrite the code to avoid
the buggy cl_callbacks list and fix the lifetime rules due to double
calls of the ->prepare callback operations method for this retry case.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r-- | fs/nfsd/state.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index e791985a7318..dbc4f85a5008 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h @@ -63,13 +63,12 @@ typedef struct { struct nfsd4_callback { struct nfs4_client *cb_clp; - struct list_head cb_per_client; u32 cb_minorversion; struct rpc_message cb_msg; struct nfsd4_callback_ops *cb_ops; struct work_struct cb_work; int cb_status; - bool cb_done; + bool cb_need_restart; }; struct nfsd4_callback_ops { @@ -334,7 +333,6 @@ struct nfs4_client { int cl_cb_state; struct nfsd4_callback cl_cb_null; struct nfsd4_session *cl_cb_session; - struct list_head cl_callbacks; /* list of in-progress callbacks */ /* for all client information that callback code might need: */ spinlock_t cl_lock; |