]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/nfs/nfs4state.c
Merge tag 'mac80211-for-davem-2017-05-23' of git://git.kernel.org/pub/scm/linux/kerne...
[karo-tx-linux.git] / fs / nfs / nfs4state.c
index 8156bad6b441095199878a900e35594863cad571..b34de036501bc90e48be043aec38485f7f755e55 100644 (file)
@@ -1649,13 +1649,14 @@ static void nfs4_state_start_reclaim_reboot(struct nfs_client *clp)
        nfs4_state_mark_reclaim_helper(clp, nfs4_state_mark_reclaim_reboot);
 }
 
-static void nfs4_reclaim_complete(struct nfs_client *clp,
+static int nfs4_reclaim_complete(struct nfs_client *clp,
                                 const struct nfs4_state_recovery_ops *ops,
                                 struct rpc_cred *cred)
 {
        /* Notify the server we're done reclaiming our state */
        if (ops->reclaim_complete)
-               (void)ops->reclaim_complete(clp, cred);
+               return ops->reclaim_complete(clp, cred);
+       return 0;
 }
 
 static void nfs4_clear_reclaim_server(struct nfs_server *server)
@@ -1702,13 +1703,16 @@ static void nfs4_state_end_reclaim_reboot(struct nfs_client *clp)
 {
        const struct nfs4_state_recovery_ops *ops;
        struct rpc_cred *cred;
+       int err;
 
        if (!nfs4_state_clear_reclaim_reboot(clp))
                return;
        ops = clp->cl_mvops->reboot_recovery_ops;
        cred = nfs4_get_clid_cred(clp);
-       nfs4_reclaim_complete(clp, ops, cred);
+       err = nfs4_reclaim_complete(clp, ops, cred);
        put_rpccred(cred);
+       if (err == -NFS4ERR_CONN_NOT_BOUND_TO_SESSION)
+               set_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state);
 }
 
 static void nfs4_state_start_reclaim_nograce(struct nfs_client *clp)