diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4state.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 6dbaa379c863..3196dc388578 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1724,6 +1724,13 @@ static void nfsd4_sequence_check_conn(struct nfsd4_conn *new, struct nfsd4_sessi | |||
1724 | return; | 1724 | return; |
1725 | } | 1725 | } |
1726 | 1726 | ||
1727 | static bool nfsd4_session_too_many_ops(struct svc_rqst *rqstp, struct nfsd4_session *session) | ||
1728 | { | ||
1729 | struct nfsd4_compoundargs *args = rqstp->rq_argp; | ||
1730 | |||
1731 | return args->opcnt > session->se_fchannel.maxops; | ||
1732 | } | ||
1733 | |||
1727 | __be32 | 1734 | __be32 |
1728 | nfsd4_sequence(struct svc_rqst *rqstp, | 1735 | nfsd4_sequence(struct svc_rqst *rqstp, |
1729 | struct nfsd4_compound_state *cstate, | 1736 | struct nfsd4_compound_state *cstate, |
@@ -1752,6 +1759,10 @@ nfsd4_sequence(struct svc_rqst *rqstp, | |||
1752 | if (!session) | 1759 | if (!session) |
1753 | goto out; | 1760 | goto out; |
1754 | 1761 | ||
1762 | status = nfserr_too_many_ops; | ||
1763 | if (nfsd4_session_too_many_ops(rqstp, session)) | ||
1764 | goto out; | ||
1765 | |||
1755 | status = nfserr_badslot; | 1766 | status = nfserr_badslot; |
1756 | if (seq->slotid >= session->se_fchannel.maxreqs) | 1767 | if (seq->slotid >= session->se_fchannel.maxreqs) |
1757 | goto out; | 1768 | goto out; |