From: Huang Guobin Date: Wed, 25 Nov 2020 08:39:33 +0000 (-0500) Subject: nfsd: Fix error return code in nfsd_file_cache_init() X-Git-Tag: v5.11-rc1~141^2~103 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=231307df246eb29f30092836524ebb1fcb8f5b25;p=users%2Fhch%2Fmisc.git nfsd: Fix error return code in nfsd_file_cache_init() 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 Signed-off-by: Chuck Lever --- diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index 3c6c2f7d1688..d77c624c61f6 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -685,6 +685,7 @@ nfsd_file_cache_init(void) if (IS_ERR(nfsd_file_fsnotify_group)) { pr_err("nfsd: unable to create fsnotify group: %ld\n", PTR_ERR(nfsd_file_fsnotify_group)); + ret = PTR_ERR(nfsd_file_fsnotify_group); nfsd_file_fsnotify_group = NULL; goto out_notifier; }