diff options
-rw-r--r-- | fs/nfsd/nfs4state.c | 9 | ||||
-rw-r--r-- | include/linux/nfsd/xdr4.h | 2 |
2 files changed, 1 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 5f634d24861c..b44a2cfde6f1 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -991,16 +991,10 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp) | |||
991 | { | 991 | { |
992 | struct nfsd4_cache_entry *entry = &resp->cstate.slot->sl_cache_entry; | 992 | struct nfsd4_cache_entry *entry = &resp->cstate.slot->sl_cache_entry; |
993 | struct svc_rqst *rqstp = resp->rqstp; | 993 | struct svc_rqst *rqstp = resp->rqstp; |
994 | struct nfsd4_compoundargs *args = rqstp->rq_argp; | ||
995 | struct nfsd4_op *op = &args->ops[resp->opcnt]; | ||
996 | struct kvec *resv = &rqstp->rq_res.head[0]; | 994 | struct kvec *resv = &rqstp->rq_res.head[0]; |
997 | 995 | ||
998 | dprintk("--> %s entry %p\n", __func__, entry); | 996 | dprintk("--> %s entry %p\n", __func__, entry); |
999 | 997 | ||
1000 | /* Don't cache a failed OP_SEQUENCE. */ | ||
1001 | if (resp->opcnt == 1 && op->opnum == OP_SEQUENCE && resp->cstate.status) | ||
1002 | return; | ||
1003 | |||
1004 | nfsd4_release_respages(entry->ce_respages, entry->ce_resused); | 998 | nfsd4_release_respages(entry->ce_respages, entry->ce_resused); |
1005 | entry->ce_opcnt = resp->opcnt; | 999 | entry->ce_opcnt = resp->opcnt; |
1006 | entry->ce_status = resp->cstate.status; | 1000 | entry->ce_status = resp->cstate.status; |
@@ -1490,9 +1484,6 @@ nfsd4_sequence(struct svc_rqst *rqstp, | |||
1490 | slot->sl_inuse = true; | 1484 | slot->sl_inuse = true; |
1491 | slot->sl_seqid = seq->seqid; | 1485 | slot->sl_seqid = seq->seqid; |
1492 | slot->sl_cache_entry.ce_cachethis = seq->cachethis; | 1486 | slot->sl_cache_entry.ce_cachethis = seq->cachethis; |
1493 | /* Always set the cache entry cachethis for solo sequence */ | ||
1494 | if (nfsd4_is_solo_sequence(resp)) | ||
1495 | slot->sl_cache_entry.ce_cachethis = 1; | ||
1496 | 1487 | ||
1497 | cstate->slot = slot; | 1488 | cstate->slot = slot; |
1498 | cstate->session = session; | 1489 | cstate->session = session; |
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index 5e4beb0deb80..3f716607c86d 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h | |||
@@ -467,7 +467,7 @@ struct nfsd4_compoundres { | |||
467 | static inline bool nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp) | 467 | static inline bool nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp) |
468 | { | 468 | { |
469 | struct nfsd4_compoundargs *args = resp->rqstp->rq_argp; | 469 | struct nfsd4_compoundargs *args = resp->rqstp->rq_argp; |
470 | return args->opcnt == 1; | 470 | return resp->opcnt == 1 && args->ops[0].opnum == OP_SEQUENCE; |
471 | } | 471 | } |
472 | 472 | ||
473 | static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp) | 473 | static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp) |