Skip to content

Commit 231307d

Browse files
Huang Guobinchucklever
authored andcommitted
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: 65294c1("nfsd: add a new struct file caching facility to nfsd") Signed-off-by: Huang Guobin <huangguobin4@huawei.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent f45a444 commit 231307d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfsd/filecache.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ nfsd_file_cache_init(void)
685685
if (IS_ERR(nfsd_file_fsnotify_group)) {
686686
pr_err("nfsd: unable to create fsnotify group: %ld\n",
687687
PTR_ERR(nfsd_file_fsnotify_group));
688+
ret = PTR_ERR(nfsd_file_fsnotify_group);
688689
nfsd_file_fsnotify_group = NULL;
689690
goto out_notifier;
690691
}

0 commit comments

Comments
 (0)