diff options
author | Mike Snitzer <snitzer@kernel.org> | 2024-09-05 22:09:44 +0300 |
---|---|---|
committer | Anna Schumaker <anna.schumaker@oracle.com> | 2024-09-23 22:03:30 +0300 |
commit | 47e988147f409f70e0f01a5e6dc5940375e02343 (patch) | |
tree | b164422c4d8f3cfe7aeaadeaefe1880a86a04f71 /rust/helpers/task.c | |
parent | c63f0e48febfaea8a3cd4146abda9cc7a329b0e3 (diff) | |
download | linux-47e988147f409f70e0f01a5e6dc5940375e02343.tar.xz |
nfsd: add nfsd_serv_try_get and nfsd_serv_put
Introduce nfsd_serv_try_get and nfsd_serv_put and update the nfsd code
to prevent nfsd_destroy_serv from destroying nn->nfsd_serv until any
caller of nfsd_serv_try_get releases their reference using nfsd_serv_put.
A percpu_ref is used to implement the interlock between
nfsd_destroy_serv and any caller of nfsd_serv_try_get.
This interlock is needed to properly wait for the completion of client
initiated localio calls to nfsd (that are _not_ in the context of nfsd).
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions