Skip to contentSkip to conversation

nfs: count correct array for mnt3_counts array size

PATCH In review Eryu Guan 4 participants 4 messages Jul 18, 2017

Subsystems (2)
lore
Share & tools
lore

Eryu Guan

author
#0 lore raw

PATCH 1/1 nfs: count correct array for mnt3_counts array size

Array size of mnt3_counts should be the size of array mnt3_procedures, not mnt_procedures, though they're same in size right now. Found this by code inspection.

Fixes 1c5876ddbdb4 ("sunrpc: move p_count out of struct rpc_procinfo")
Cc Christoph Hellwig <[email protected]>
---
 fs/nfs/mount_clnt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/mount_clnt.c +1 -1
index 3efe946672be..60bad882c123 100644
@@ -512,7 +512,7 @@ static const struct rpc_version mnt_version1 = {
 	.counts		= mnt_counts,
 };
 
-static unsigned int mnt3_counts[ARRAY_SIZE(mnt_procedures)];
+static unsigned int mnt3_counts[ARRAY_SIZE(mnt3_procedures)];
 static const struct rpc_version mnt_version3 = {
 	.number		= 3,
 	.nrprocs	= ARRAY_SIZE(mnt3_procedures),
Signature · 1 line
2.13.3
#2 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 7 lines · Eryu Guan

Array size of mnt3_counts should be the size of array mnt3_procedures, not mnt_procedures, though they're same in size right now. Found this by code inspection.

Fixes 1c5876ddbdb4 ("sunrpc: move p_count out of struct rpc_procinfo")
Cc Christoph Hellwig <[email protected]>
Quoted 5 lines

Oops, yes.

Looks good:

Thanks, I'm assuming Anna gets this.

--b.

#3 lore raw
Quoted 10 lines · J. Bruce Fields
Quoted 9 lines · Christoph Hellwig
Quoted 7 lines · Eryu Guan

Array size of mnt3_counts should be the size of array mnt3_procedures, not mnt_procedures, though they're same in size right now. Found this by code inspection.

Fixes 1c5876ddbdb4 ("sunrpc: move p_count out of struct rpc_procinfo")
Cc Christoph Hellwig <[email protected]>
Quoted 7 lines
Quoted 5 lines

Oops, yes.

Looks good:

Thanks, I'm assuming Anna gets this.

Yep, I'll take it.

Quoted 3 lines

--b.