Skip to content

Commit cc1ce2f

Browse files
author
J. Bruce Fields
committed
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 <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
1 parent 20428a8 commit cc1ce2f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fs/nfsd/nfs4callback.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,12 @@ static struct nfsd4_conn * __nfsd4_find_backchannel(struct nfs4_client *clp)
12431243
return NULL;
12441244
}
12451245

1246+
/*
1247+
* Note there isn't a lot of locking in this code; instead we depend on
1248+
* the fact that it is run from the callback_wq, which won't run two
1249+
* work items at once. So, for example, callback_wq handles all access
1250+
* of cl_cb_client and all calls to rpc_create or rpc_shutdown_client.
1251+
*/
12461252
static void nfsd4_process_cb_update(struct nfsd4_callback *cb)
12471253
{
12481254
struct nfs4_cb_conn conn;

0 commit comments

Comments
 (0)