diff options
| author | Jeff Layton <jlayton@kernel.org> | 2025-04-10 16:42:04 -0400 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2025-04-27 23:25:44 -0400 |
| commit | d5fb22a7c585b12ec3e6cef150689f7386e8cfd0 (patch) | |
| tree | 55948d34f28d65b2633c9aae34f39cde99e02b7b /fs/nfs/netns.h | |
| parent | nfs: don't share pNFS DS connections between net namespaces (diff) | |
| download | linux-d5fb22a7c585b12ec3e6cef150689f7386e8cfd0.tar.gz linux-d5fb22a7c585b12ec3e6cef150689f7386e8cfd0.zip | |
nfs: move the nfs4_data_server_cache into struct nfs_net
Since struct nfs4_pnfs_ds should not be shared between net namespaces,
move from a global list of objects to a per-netns list and spinlock.
Tested-by: Sargun Dillon <sargun@sargun.me>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Link: https://lore.kernel.org/r/20250410-nfs-ds-netns-v2-2-f80b7979ba80@kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/netns.h')
| -rw-r--r-- | fs/nfs/netns.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/netns.h b/fs/nfs/netns.h index a68b21603ea9..6ba3ea39e928 100644 --- a/fs/nfs/netns.h +++ b/fs/nfs/netns.h @@ -31,7 +31,11 @@ struct nfs_net { unsigned short nfs_callback_tcpport; unsigned short nfs_callback_tcpport6; int cb_users[NFS4_MAX_MINOR_VERSION + 1]; -#endif +#endif /* CONFIG_NFS_V4 */ +#if IS_ENABLED(CONFIG_NFS_V4_1) + struct list_head nfs4_data_server_cache; + spinlock_t nfs4_data_server_lock; +#endif /* CONFIG_NFS_V4_1 */ struct nfs_netns_client *nfs_client; spinlock_t nfs_client_lock; ktime_t boot_time; |
