Commit 54185267 authored by Wei Yongjun's avatar Wei Yongjun Committed by J. Bruce Fields

NFSD: Fix error return code in nfsd4_interssc_connect()

'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: f4e44b39 ("NFSD: delay unmount source's export after inter-server copy completed.")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent f47dc2d3
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment