summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2019-10-29 21:02:18 +0100
committerJ. Bruce Fields <bfields@redhat.com>2019-11-08 18:32:59 +0100
commitcc1ce2f13ea1c13d7f1f322146b01446d9f7ad8b (patch)
treec1bd2fb9fc35463c37ed2fc58f174badc1718973 /fs
parentnfsd: mark cb path down on unknown errors (diff)
downloadlinux-cc1ce2f13ea1c13d7f1f322146b01446d9f7ad8b.tar.xz
linux-cc1ce2f13ea1c13d7f1f322146b01446d9f7ad8b.zip
nfsd: document callback_wq serialization of callback code
The callback code relies on the fact that much of it is only ever called from the ordered workqueue callback_wq, and this is worth documenting. Reported-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4callback.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index c94768b096a3..24534db87e86 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -1243,6 +1243,12 @@ static struct nfsd4_conn * __nfsd4_find_backchannel(struct nfs4_client *clp)
return NULL;
}
+/*
+ * Note there isn't a lot of locking in this code; instead we depend on
+ * the fact that it is run from the callback_wq, which won't run two
+ * work items at once. So, for example, callback_wq handles all access
+ * of cl_cb_client and all calls to rpc_create or rpc_shutdown_client.
+ */
static void nfsd4_process_cb_update(struct nfsd4_callback *cb)
{
struct nfs4_cb_conn conn;