diff options
author | Alexei Starovoitov <ast@kernel.org> | 2024-10-25 03:45:59 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-10-25 03:47:28 +0200 |
commit | bfa7b5c98be4bdcf8aaa4e5ca0b91359ea28c05c (patch) | |
tree | 751b70005cb6641c42e90191f35dac731459a6ec /include/linux/nfslocalio.h | |
parent | Merge branch 'share-user-memory-to-bpf-program-through-task-storage-map' (diff) | |
parent | Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf (diff) | |
download | linux-bfa7b5c98be4bdcf8aaa4e5ca0b91359ea28c05c.tar.xz linux-bfa7b5c98be4bdcf8aaa4e5ca0b91359ea28c05c.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Cross-merge bpf fixes after downstream PR.
No conflicts.
Adjacent changes in:
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/bpf/btf.c
kernel/bpf/helpers.c
kernel/bpf/syscall.c
kernel/bpf/verifier.c
kernel/trace/bpf_trace.c
mm/slab_common.c
tools/include/uapi/linux/bpf.h
tools/testing/selftests/bpf/Makefile
Link: https://lore.kernel.org/all/20241024215724.60017-1-daniel@iogearbox.net/
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/nfslocalio.h')
-rw-r--r-- | include/linux/nfslocalio.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/nfslocalio.h b/include/linux/nfslocalio.h index b353abe00357..b0dd9b1eef4f 100644 --- a/include/linux/nfslocalio.h +++ b/include/linux/nfslocalio.h @@ -65,10 +65,25 @@ struct nfsd_file *nfs_open_local_fh(nfs_uuid_t *, struct rpc_clnt *, const struct cred *, const struct nfs_fh *, const fmode_t); +static inline void nfs_to_nfsd_file_put_local(struct nfsd_file *localio) +{ + /* + * Once reference to nfsd_serv is dropped, NFSD could be + * unloaded, so ensure safe return from nfsd_file_put_local() + * by always taking RCU. + */ + rcu_read_lock(); + nfs_to->nfsd_file_put_local(localio); + rcu_read_unlock(); +} + #else /* CONFIG_NFS_LOCALIO */ static inline void nfsd_localio_ops_init(void) { } +static inline void nfs_to_nfsd_file_put_local(struct nfsd_file *localio) +{ +} #endif /* CONFIG_NFS_LOCALIO */ #endif /* __LINUX_NFSLOCALIO_H */ |