diff options
author | NeilBrown <neilb@suse.de> | 2024-08-06 21:11:32 -0400 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2024-09-20 19:29:23 -0400 |
commit | 73598a0cfb21fb21928e638f7f21be6021ac2a16 (patch) | |
tree | 266aeb2e0ee1ea7f5c5ce7b78264baa61030c6cb /fs/nfsd/nfsd.h | |
parent | c9f10f811cf707e7d7a33e9f7ff678aab9f85551 (diff) | |
download | linux-73598a0cfb21fb21928e638f7f21be6021ac2a16.tar.gz linux-73598a0cfb21fb21928e638f7f21be6021ac2a16.tar.bz2 linux-73598a0cfb21fb21928e638f7f21be6021ac2a16.zip |
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/nfsd.h')
-rw-r--r-- | fs/nfsd/nfsd.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h index 39e109a7d56d..369c3b3ce53e 100644 --- a/fs/nfsd/nfsd.h +++ b/fs/nfsd/nfsd.h @@ -23,9 +23,7 @@ #include <uapi/linux/nfsd/debug.h> -#include "netns.h" #include "export.h" -#include "stats.h" #undef ifdebug #ifdef CONFIG_SUNRPC_DEBUG @@ -37,7 +35,14 @@ /* * nfsd version */ +#define NFSD_MINVERS 2 +#define NFSD_MAXVERS 4 #define NFSD_SUPPORTED_MINOR_VERSION 2 +bool nfsd_support_version(int vers); + +#include "netns.h" +#include "stats.h" + /* * Maximum blocksizes supported by daemon under various circumstances. */ |