Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297427
b: refs/heads/master
c: bf5c43c
h: refs/heads/master
i:
  297425: b2dd005
  297423: f74958d
v: v3
  • Loading branch information
J. Bruce Fields committed Feb 14, 2012
1 parent 66b331c commit 25febab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73e79482b40fb6671915e3da0d178862a07ef254
refs/heads/master: bf5c43c8f155e755b0fc3dfa76f9f8c6e2c0161f
8 changes: 7 additions & 1 deletion trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,7 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
slot->sl_opcnt = resp->opcnt;
slot->sl_status = resp->cstate.status;

slot->sl_flags |= NFSD4_SLOT_INITIALIZED;
if (nfsd4_not_cached(resp)) {
slot->sl_datalen = 0;
return;
Expand Down Expand Up @@ -1916,6 +1917,9 @@ nfsd4_sequence(struct svc_rqst *rqstp,
status = check_slot_seqid(seq->seqid, slot->sl_seqid,
slot->sl_flags & NFSD4_SLOT_INUSE);
if (status == nfserr_replay_cache) {
status = nfserr_seq_misordered;
if (!(slot->sl_flags & NFSD4_SLOT_INITIALIZED))
goto out;
cstate->slot = slot;
cstate->session = session;
/* Return the cached reply status and set cstate->status
Expand All @@ -1932,9 +1936,11 @@ nfsd4_sequence(struct svc_rqst *rqstp,

/* Success! bump slot seqid */
slot->sl_seqid = seq->seqid;
slot->sl_flags = NFSD4_SLOT_INUSE;
slot->sl_flags |= NFSD4_SLOT_INUSE;
if (seq->cachethis)
slot->sl_flags |= NFSD4_SLOT_CACHETHIS;
else
slot->sl_flags &= ~NFSD4_SLOT_CACHETHIS;

cstate->slot = slot;
cstate->session = session;
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/nfsd/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ struct nfsd4_slot {
u16 sl_opcnt;
#define NFSD4_SLOT_INUSE (1 << 0)
#define NFSD4_SLOT_CACHETHIS (1 << 1)
#define NFSD4_SLOT_INITIALIZED (1 << 2)
u8 sl_flags;
char sl_data[];
};
Expand Down

0 comments on commit 25febab

Please sign in to comment.