diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4state.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 92968c94c6e6..142b63bc2051 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1531,8 +1531,6 @@ renew: | |||
1531 | status = nfs_ok; | 1531 | status = nfs_ok; |
1532 | renew_client(sop->so_client); | 1532 | renew_client(sop->so_client); |
1533 | out: | 1533 | out: |
1534 | if (status && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS) | ||
1535 | status = nfserr_reclaim_bad; | ||
1536 | return status; | 1534 | return status; |
1537 | } | 1535 | } |
1538 | 1536 | ||
@@ -1688,17 +1686,11 @@ nfs4_upgrade_open(struct svc_rqst *rqstp, struct svc_fh *cur_fh, struct nfs4_sta | |||
1688 | 1686 | ||
1689 | /* decrement seqid on successful reclaim, it will be bumped in encode_open */ | 1687 | /* decrement seqid on successful reclaim, it will be bumped in encode_open */ |
1690 | static void | 1688 | static void |
1691 | nfs4_set_claim_prev(struct nfsd4_open *open, int *status) | 1689 | nfs4_set_claim_prev(struct nfsd4_open *open) |
1692 | { | 1690 | { |
1693 | if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS) { | 1691 | open->op_stateowner->so_confirmed = 1; |
1694 | if (*status) | 1692 | open->op_stateowner->so_client->cl_firststate = 1; |
1695 | *status = nfserr_reclaim_bad; | 1693 | open->op_stateowner->so_seqid--; |
1696 | else { | ||
1697 | open->op_stateowner->so_confirmed = 1; | ||
1698 | open->op_stateowner->so_client->cl_firststate = 1; | ||
1699 | open->op_stateowner->so_seqid--; | ||
1700 | } | ||
1701 | } | ||
1702 | } | 1694 | } |
1703 | 1695 | ||
1704 | /* | 1696 | /* |
@@ -1863,8 +1855,8 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf | |||
1863 | out: | 1855 | out: |
1864 | if (fp) | 1856 | if (fp) |
1865 | put_nfs4_file(fp); | 1857 | put_nfs4_file(fp); |
1866 | /* CLAIM_PREVIOUS has different error returns */ | 1858 | if (status == 0 && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS) |
1867 | nfs4_set_claim_prev(open, &status); | 1859 | nfs4_set_claim_prev(open); |
1868 | /* | 1860 | /* |
1869 | * To finish the open response, we just need to set the rflags. | 1861 | * To finish the open response, we just need to set the rflags. |
1870 | */ | 1862 | */ |
@@ -2738,11 +2730,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock | |||
2738 | CHECK_FH | OPEN_STATE, | 2730 | CHECK_FH | OPEN_STATE, |
2739 | &open_sop, &open_stp, | 2731 | &open_sop, &open_stp, |
2740 | &lock->v.new.clientid); | 2732 | &lock->v.new.clientid); |
2741 | if (status) { | 2733 | if (status) |
2742 | if (lock->lk_reclaim) | ||
2743 | status = nfserr_reclaim_bad; | ||
2744 | goto out; | 2734 | goto out; |
2745 | } | ||
2746 | /* create lockowner and lock stateid */ | 2735 | /* create lockowner and lock stateid */ |
2747 | fp = open_stp->st_file; | 2736 | fp = open_stp->st_file; |
2748 | strhashval = lock_ownerstr_hashval(fp->fi_inode, | 2737 | strhashval = lock_ownerstr_hashval(fp->fi_inode, |