* [PATCH] nfsd: Fix error return code in nfsd_file_cache_init()
@ 2020-11-25 8:39 Huang Guobin
2020-11-25 14:17 ` J. Bruce Fields
0 siblings, 1 reply; 3+ messages in thread
From: Huang Guobin @ 2020-11-25 8:39 UTC (permalink / raw)
To: bfields, chuck.lever, trond.myklebust, richard.sharpe, dros, jeff.layton
Cc: linux-nfs, linux-kernel
Fix to return PTR_ERR() error code from the error handling case instead of
0 in function nfsd_file_cache_init(), as done elsewhere in this function.
Fixes: 65294c1f2c5e7("nfsd: add a new struct file caching facility to nfsd")
Signed-off-by: Huang Guobin <huangguobin4@huawei.com>
---
fs/nfsd/filecache.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index c8b9d2667ee6..a8a5b555f08b 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -686,6 +686,7 @@ nfsd_file_cache_init(void)
pr_err("nfsd: unable to create fsnotify group: %ld\n",
PTR_ERR(nfsd_file_fsnotify_group));
nfsd_file_fsnotify_group = NULL;
+ ret = PTR_ERR(nfsd_file_fsnotify_group);
goto out_notifier;
}
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nfsd: Fix error return code in nfsd_file_cache_init()
2020-11-25 8:39 [PATCH] nfsd: Fix error return code in nfsd_file_cache_init() Huang Guobin
@ 2020-11-25 14:17 ` J. Bruce Fields
2020-11-25 14:59 ` Chuck Lever
0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2020-11-25 14:17 UTC (permalink / raw)
To: Huang Guobin
Cc: chuck.lever, trond.myklebust, richard.sharpe, dros, jeff.layton,
linux-nfs, linux-kernel
On Wed, Nov 25, 2020 at 03:39:33AM -0500, Huang Guobin wrote:
> Fix to return PTR_ERR() error code from the error handling case instead of
> 0 in function nfsd_file_cache_init(), as done elsewhere in this function.
>
> Fixes: 65294c1f2c5e7("nfsd: add a new struct file caching facility to nfsd")
> Signed-off-by: Huang Guobin <huangguobin4@huawei.com>
> ---
> fs/nfsd/filecache.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
> index c8b9d2667ee6..a8a5b555f08b 100644
> --- a/fs/nfsd/filecache.c
> +++ b/fs/nfsd/filecache.c
> @@ -686,6 +686,7 @@ nfsd_file_cache_init(void)
> pr_err("nfsd: unable to create fsnotify group: %ld\n",
> PTR_ERR(nfsd_file_fsnotify_group));
> nfsd_file_fsnotify_group = NULL;
> + ret = PTR_ERR(nfsd_file_fsnotify_group);
I think you meant to add that one line earlier.
Otherwise fine, but it looks like an unlikely case so can probably wait
for the merge window.
--b.
> goto out_notifier;
> }
>
> --
> 2.22.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nfsd: Fix error return code in nfsd_file_cache_init()
2020-11-25 14:17 ` J. Bruce Fields
@ 2020-11-25 14:59 ` Chuck Lever
0 siblings, 0 replies; 3+ messages in thread
From: Chuck Lever @ 2020-11-25 14:59 UTC (permalink / raw)
To: Bruce Fields, Huang Guobin
Cc: Trond Myklebust, richard.sharpe, Dros Adamson, Jeff Layton,
Linux NFS Mailing List, Linux Kernel Mailing List
> On Nov 25, 2020, at 9:17 AM, J. Bruce Fields <bfields@fieldses.org> wrote:
>
> On Wed, Nov 25, 2020 at 03:39:33AM -0500, Huang Guobin wrote:
>> Fix to return PTR_ERR() error code from the error handling case instead of
>> 0 in function nfsd_file_cache_init(), as done elsewhere in this function.
>>
>> Fixes: 65294c1f2c5e7("nfsd: add a new struct file caching facility to nfsd")
>> Signed-off-by: Huang Guobin <huangguobin4@huawei.com>
>> ---
>> fs/nfsd/filecache.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
>> index c8b9d2667ee6..a8a5b555f08b 100644
>> --- a/fs/nfsd/filecache.c
>> +++ b/fs/nfsd/filecache.c
>> @@ -686,6 +686,7 @@ nfsd_file_cache_init(void)
>> pr_err("nfsd: unable to create fsnotify group: %ld\n",
>> PTR_ERR(nfsd_file_fsnotify_group));
>> nfsd_file_fsnotify_group = NULL;
>> + ret = PTR_ERR(nfsd_file_fsnotify_group);
>
> I think you meant to add that one line earlier.
>
> Otherwise fine, but it looks like an unlikely case so can probably wait
> for the merge window.
Applied for the v5.11 merge window with Bruce's suggested change,
and pushed to the cel-next branch in
git://git.linux-nfs.org/projects/cel/cel-2.6.git
or
https://git.linux-nfs.org/?p=cel/cel-2.6.git;a=summary
>> goto out_notifier;
>> }
>>
>> --
>> 2.22.0
--
Chuck Lever
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-25 15:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 8:39 [PATCH] nfsd: Fix error return code in nfsd_file_cache_init() Huang Guobin
2020-11-25 14:17 ` J. Bruce Fields
2020-11-25 14:59 ` Chuck Lever
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.