]> Pileus Git - ~andy/linux/blobdiff - fs/nfs/nfs4state.c
Merge branch 'for-3.13' of git://linux-nfs.org/~bfields/linux
[~andy/linux] / fs / nfs / nfs4state.c
index c8e729deb4f711fc38349c2b883f29c7ecb6b407..059c01b67a7164a6d782139fb7b66b0d3976ad21 100644 (file)
@@ -244,7 +244,7 @@ static int nfs4_drain_slot_tbl(struct nfs4_slot_table *tbl)
        set_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state);
        spin_lock(&tbl->slot_tbl_lock);
        if (tbl->highest_used_slotid != NFS4_NO_SLOT) {
-               INIT_COMPLETION(tbl->complete);
+               reinit_completion(&tbl->complete);
                spin_unlock(&tbl->slot_tbl_lock);
                return wait_for_completion_interruptible(&tbl->complete);
        }
@@ -2093,10 +2093,15 @@ again:
                        nfs4_root_machine_cred(clp);
                        goto again;
                }
-               if (i > 2)
+               if (clnt->cl_auth->au_flavor == RPC_AUTH_UNIX)
                        break;
        case -NFS4ERR_CLID_INUSE:
        case -NFS4ERR_WRONGSEC:
+               /* No point in retrying if we already used RPC_AUTH_UNIX */
+               if (clnt->cl_auth->au_flavor == RPC_AUTH_UNIX) {
+                       status = -EPERM;
+                       break;
+               }
                clnt = rpc_clone_client_set_auth(clnt, RPC_AUTH_UNIX);
                if (IS_ERR(clnt)) {
                        status = PTR_ERR(clnt);