diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-04-05 13:22:50 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-04-05 13:22:50 -0400 |
commit | ea33e6c3e79d23ef693b7ed3171ef90dddfbfc15 (patch) | |
tree | 082cf88ddbd43004ded9a8a456f6d67783f78083 /fs | |
parent | 23631227a672de5e81e167c3178b39e9a50f6541 (diff) | |
download | linux-ea33e6c3e79d23ef693b7ed3171ef90dddfbfc15.tar.bz2 |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4state.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index a30f51eb048f..209df6976a5b 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1876,8 +1876,8 @@ int nfs4_discover_server_trunking(struct nfs_client *clp, i = 0; mutex_lock(&nfs_clid_init_mutex); - status = -ENOENT; again: + status = -ENOENT; cred = ops->get_clid_cred(clp); if (cred == NULL) goto out_unlock; @@ -1916,6 +1916,11 @@ again: case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery * in nfs4_exchange_id */ status = -EKEYEXPIRED; + break; + default: + pr_warn("NFS: %s unhandled error %d. Exiting with error EIO\n", + __func__, status); + status = -EIO; } out_unlock: |