diff mbox

nfs: count correct array for mnt3_counts array size

Message ID 20170718053232.14858-1-eguan@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eryu Guan July 18, 2017, 5:32 a.m. UTC
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 <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 fs/nfs/mount_clnt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig July 18, 2017, 9:08 a.m. UTC | #1
On Tue, Jul 18, 2017 at 01:32:32PM +0800, Eryu Guan wrote:
> 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 <hch@lst.de>
> Signed-off-by: Eryu Guan <eguan@redhat.com>

Oops, yes.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
J. Bruce Fields July 18, 2017, 4:04 p.m. UTC | #2
On Tue, Jul 18, 2017 at 11:08:53AM +0200, Christoph Hellwig wrote:
> On Tue, Jul 18, 2017 at 01:32:32PM +0800, Eryu Guan wrote:
> > 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 <hch@lst.de>
> > Signed-off-by: Eryu Guan <eguan@redhat.com>
> 
> Oops, yes.
> 
> Looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks, I'm assuming Anna gets this.

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Anna Schumaker July 18, 2017, 5:31 p.m. UTC | #3
On 07/18/2017 12:04 PM, J. Bruce Fields wrote:
> On Tue, Jul 18, 2017 at 11:08:53AM +0200, Christoph Hellwig wrote:
>> On Tue, Jul 18, 2017 at 01:32:32PM +0800, Eryu Guan wrote:
>>> 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 <hch@lst.de>
>>> Signed-off-by: Eryu Guan <eguan@redhat.com>
>>
>> Oops, yes.
>>
>> Looks good:
>>
>> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> Thanks, I'm assuming Anna gets this.

Yep, I'll take it.

> 
> --b.
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index 3efe946672be..60bad882c123 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -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),