Skip to content

Commit

Permalink
NFSD: Fix error return code in nfsd4_interssc_connect()
Browse files Browse the repository at this point in the history
'status' has been overwritten to 0 after nfsd4_ssc_setup_dul(), this
cause 0 will be return in vfs_kern_mount() error case. Fix to return
nfserr_nodev in this error.

Fixes: f4e44b3 ("NFSD: delay unmount source's export after inter-server copy completed.")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Wei Yongjun authored and J. Bruce Fields committed Jul 7, 2021
1 parent f47dc2d commit 5418526
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfsd/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,7 @@ nfsd4_interssc_connect(struct nl4_server *nss, struct svc_rqst *rqstp,
ss_mnt = vfs_kern_mount(type, SB_KERNMOUNT, dev_name, raw_data);
module_put(type->owner);
if (IS_ERR(ss_mnt)) {
status = nfserr_nodev;
if (work)
nfsd4_ssc_cancel_dul_work(nn, work);
goto out_free_devname;
Expand Down

0 comments on commit 5418526

Please sign in to comment.