summaryrefslogtreecommitdiff
path: root/fs/nfsd/netns.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2024-08-06 21:11:32 -0400
committerChuck Lever <chuck.lever@oracle.com>2024-09-20 19:29:23 -0400
commit73598a0cfb21fb21928e638f7f21be6021ac2a16 (patch)
tree266aeb2e0ee1ea7f5c5ce7b78264baa61030c6cb /fs/nfsd/netns.h
parentc9f10f811cf707e7d7a33e9f7ff678aab9f85551 (diff)
nfsd: don't allocate the versions array.
Instead of using kmalloc to allocate an array for storing active version info, just declare an array to the max size - it is only 5 or so. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/netns.h')
-rw-r--r--fs/nfsd/netns.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h
index 14ec15656320..238fc4e56e53 100644
--- a/fs/nfsd/netns.h
+++ b/fs/nfsd/netns.h
@@ -152,8 +152,8 @@ struct nfsd_net {
/*
* Version information
*/
- bool *nfsd_versions;
- bool *nfsd4_minorversions;
+ bool nfsd_versions[NFSD_MAXVERS + 1];
+ bool nfsd4_minorversions[NFSD_SUPPORTED_MINOR_VERSION + 1];
/*
* Duplicate reply cache
@@ -219,8 +219,6 @@ struct nfsd_net {
#define nfsd_netns_ready(nn) ((nn)->sessionid_hashtbl)
extern bool nfsd_support_version(int vers);
-extern void nfsd_netns_free_versions(struct nfsd_net *nn);
-
extern unsigned int nfsd_net_id;
void nfsd_copy_write_verifier(__be32 verf[2], struct nfsd_net *nn);