]> git.karo-electronics.de Git - karo-tx-linux.git/commit
nfsd: fix callback restarts
authorChristoph Hellwig <hch@lst.de>
Thu, 30 Apr 2015 09:49:24 +0000 (11:49 +0200)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 4 May 2015 16:02:41 +0000 (12:02 -0400)
commitcba5f62b1830c1919b47544789bc993e6e617dc6
tree6f85f8982fe083ea576b7938799e56fe4d675bec
parentef2a1b3e1067195f1d6b89d8329454775c87f033
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>
fs/nfsd/nfs4callback.c
fs/nfsd/nfs4state.c
fs/nfsd/state.h