[PATCH] SQUASH nfsd: don't allocate the versions array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




In "nfsd: don't allocate the versions array" I made the various arrays
of version information fixed-sized - except nfsd_version.
The size of nfsd_version was determined by  CONFIG settings and could be
smaller than the index used by nfsd_support_version().

This patch makes it fixed-size.  It should be squashed into the original.

Signed-off-by: NeilBrown <neilb@xxxxxxx>
---
 fs/nfsd/nfssvc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 1cef09a3c78e..defc430f912f 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -106,7 +106,7 @@ static struct svc_program	nfsd_acl_program = {
 
 #endif /* defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) */
 
-static const struct svc_version *nfsd_version[] = {
+static const struct svc_version *nfsd_version[NFSD_MAXVERS+1] = {
 #if defined(CONFIG_NFSD_V2)
 	[2] = &nfsd_version2,
 #endif
-- 
2.44.0





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux