mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
NFSv4: Fix issues in nfs4_discover_server_trunking
- Ensure that we exit with ENOENT if the call to ops->get_clid_cred() fails. - Handle the case where ops->detect_trunking() exits with an unexpected error, and return EIO. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
23631227a6
commit
ea33e6c3e7
1 changed files with 6 additions and 1 deletions
|
@ -1876,8 +1876,8 @@ int nfs4_discover_server_trunking(struct nfs_client *clp,
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
mutex_lock(&nfs_clid_init_mutex);
|
mutex_lock(&nfs_clid_init_mutex);
|
||||||
status = -ENOENT;
|
|
||||||
again:
|
again:
|
||||||
|
status = -ENOENT;
|
||||||
cred = ops->get_clid_cred(clp);
|
cred = ops->get_clid_cred(clp);
|
||||||
if (cred == NULL)
|
if (cred == NULL)
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
@ -1916,6 +1916,11 @@ again:
|
||||||
case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery
|
case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery
|
||||||
* in nfs4_exchange_id */
|
* in nfs4_exchange_id */
|
||||||
status = -EKEYEXPIRED;
|
status = -EKEYEXPIRED;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
pr_warn("NFS: %s unhandled error %d. Exiting with error EIO\n",
|
||||||
|
__func__, status);
|
||||||
|
status = -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
out_unlock:
|
out_unlock:
|
||||||
|
|
Loading…
Add table
Reference in a new issue