aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4state.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 3196dc388578..2bb03f86a037 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1818,6 +1818,8 @@ out:
1818__be32 1818__be32
1819nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_reclaim_complete *rc) 1819nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_reclaim_complete *rc)
1820{ 1820{
1821 int status = 0;
1822
1821 if (rc->rca_one_fs) { 1823 if (rc->rca_one_fs) {
1822 if (!cstate->current_fh.fh_dentry) 1824 if (!cstate->current_fh.fh_dentry)
1823 return nfserr_nofilehandle; 1825 return nfserr_nofilehandle;
@@ -1827,9 +1829,14 @@ nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *csta
1827 */ 1829 */
1828 return nfs_ok; 1830 return nfs_ok;
1829 } 1831 }
1832
1830 nfs4_lock_state(); 1833 nfs4_lock_state();
1831 if (is_client_expired(cstate->session->se_client)) { 1834 status = nfserr_complete_already;
1832 nfs4_unlock_state(); 1835 if (cstate->session->se_client->cl_firststate)
1836 goto out;
1837
1838 status = nfserr_stale_clientid;
1839 if (is_client_expired(cstate->session->se_client))
1833 /* 1840 /*
1834 * The following error isn't really legal. 1841 * The following error isn't really legal.
1835 * But we only get here if the client just explicitly 1842 * But we only get here if the client just explicitly
@@ -1837,11 +1844,13 @@ nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *csta
1837 * error it gets back on an operation for the dead 1844 * error it gets back on an operation for the dead
1838 * client. 1845 * client.
1839 */ 1846 */
1840 return nfserr_stale_clientid; 1847 goto out;
1841 } 1848
1849 status = nfs_ok;
1842 nfsd4_create_clid_dir(cstate->session->se_client); 1850 nfsd4_create_clid_dir(cstate->session->se_client);
1851out:
1843 nfs4_unlock_state(); 1852 nfs4_unlock_state();
1844 return nfs_ok; 1853 return status;
1845} 1854}
1846 1855
1847__be32 1856__be32