Skip to content

Commit

Permalink
NFSv4: Fix issues in nfs4_discover_server_trunking
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Apr 5, 2013
1 parent 2363122 commit ea33e6c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/nfs/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1916,6 +1916,11 @@ int nfs4_discover_server_trunking(struct nfs_client *clp,
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:
Expand Down

0 comments on commit ea33e6c

Please sign in to comment.