diff options
-rw-r--r-- | fs/nfsd/nfs4state.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 596702e157c9..02c23b7c5cd5 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -3046,7 +3046,11 @@ nfs4_preprocess_stateid_op(struct nfsd4_compound_state *cstate, | |||
3046 | if (STALE_STATEID(stateid)) | 3046 | if (STALE_STATEID(stateid)) |
3047 | goto out; | 3047 | goto out; |
3048 | 3048 | ||
3049 | status = nfserr_bad_stateid; | 3049 | /* |
3050 | * We assume that any stateid that has the current boot time, | ||
3051 | * but that we can't find, is expired: | ||
3052 | */ | ||
3053 | status = nfserr_expired; | ||
3050 | if (is_delegation_stateid(stateid)) { | 3054 | if (is_delegation_stateid(stateid)) { |
3051 | dp = find_delegation_stateid(ino, stateid); | 3055 | dp = find_delegation_stateid(ino, stateid); |
3052 | if (!dp) | 3056 | if (!dp) |
@@ -3066,6 +3070,7 @@ nfs4_preprocess_stateid_op(struct nfsd4_compound_state *cstate, | |||
3066 | stp = find_stateid(stateid, flags); | 3070 | stp = find_stateid(stateid, flags); |
3067 | if (!stp) | 3071 | if (!stp) |
3068 | goto out; | 3072 | goto out; |
3073 | status = nfserr_bad_stateid; | ||
3069 | if (nfs4_check_fh(current_fh, stp)) | 3074 | if (nfs4_check_fh(current_fh, stp)) |
3070 | goto out; | 3075 | goto out; |
3071 | if (!stp->st_stateowner->so_confirmed) | 3076 | if (!stp->st_stateowner->so_confirmed) |
@@ -3140,8 +3145,9 @@ nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, | |||
3140 | * a replayed close: | 3145 | * a replayed close: |
3141 | */ | 3146 | */ |
3142 | sop = search_close_lru(stateid->si_stateownerid, flags); | 3147 | sop = search_close_lru(stateid->si_stateownerid, flags); |
3148 | /* It's not stale; let's assume it's expired: */ | ||
3143 | if (sop == NULL) | 3149 | if (sop == NULL) |
3144 | return nfserr_bad_stateid; | 3150 | return nfserr_expired; |
3145 | *sopp = sop; | 3151 | *sopp = sop; |
3146 | goto check_replay; | 3152 | goto check_replay; |
3147 | } | 3153 | } |
@@ -3406,6 +3412,7 @@ nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
3406 | status = nfserr_bad_stateid; | 3412 | status = nfserr_bad_stateid; |
3407 | if (!is_delegation_stateid(stateid)) | 3413 | if (!is_delegation_stateid(stateid)) |
3408 | goto out; | 3414 | goto out; |
3415 | status = nfserr_expired; | ||
3409 | dp = find_delegation_stateid(inode, stateid); | 3416 | dp = find_delegation_stateid(inode, stateid); |
3410 | if (!dp) | 3417 | if (!dp) |
3411 | goto out; | 3418 | goto out; |