All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs: count correct array for mnt3_counts array size
@ 2017-07-18  5:32 Eryu Guan
  2017-07-18  9:08 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Eryu Guan @ 2017-07-18  5:32 UTC (permalink / raw)
  To: linux-nfs; +Cc: Eryu Guan, Christoph Hellwig

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(-)

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),
-- 
2.13.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfs: count correct array for mnt3_counts array size
  2017-07-18  5:32 [PATCH] nfs: count correct array for mnt3_counts array size Eryu Guan
@ 2017-07-18  9:08 ` Christoph Hellwig
  2017-07-18 16:04   ` J. Bruce Fields
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2017-07-18  9:08 UTC (permalink / raw)
  To: Eryu Guan; +Cc: linux-nfs, Christoph Hellwig

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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfs: count correct array for mnt3_counts array size
  2017-07-18  9:08 ` Christoph Hellwig
@ 2017-07-18 16:04   ` J. Bruce Fields
  2017-07-18 17:31     ` Anna Schumaker
  0 siblings, 1 reply; 4+ messages in thread
From: J. Bruce Fields @ 2017-07-18 16:04 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Eryu Guan, linux-nfs, Anna Schumaker, Trond Myklebust

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfs: count correct array for mnt3_counts array size
  2017-07-18 16:04   ` J. Bruce Fields
@ 2017-07-18 17:31     ` Anna Schumaker
  0 siblings, 0 replies; 4+ messages in thread
From: Anna Schumaker @ 2017-07-18 17:31 UTC (permalink / raw)
  To: J. Bruce Fields, Christoph Hellwig
  Cc: Eryu Guan, linux-nfs, Anna Schumaker, Trond Myklebust



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.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-18 17:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-18  5:32 [PATCH] nfs: count correct array for mnt3_counts array size Eryu Guan
2017-07-18  9:08 ` Christoph Hellwig
2017-07-18 16:04   ` J. Bruce Fields
2017-07-18 17:31     ` Anna Schumaker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.