diff options
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 50bc94243ca1..793a0b0a6cdd 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -740,7 +740,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, | |||
740 | struct svc_fh *current_fh = NULL; | 740 | struct svc_fh *current_fh = NULL; |
741 | struct svc_fh *save_fh = NULL; | 741 | struct svc_fh *save_fh = NULL; |
742 | struct nfs4_stateowner *replay_owner = NULL; | 742 | struct nfs4_stateowner *replay_owner = NULL; |
743 | int slack_space; /* in words, not bytes! */ | 743 | int slack_bytes; |
744 | __be32 status; | 744 | __be32 status; |
745 | 745 | ||
746 | status = nfserr_resource; | 746 | status = nfserr_resource; |
@@ -790,10 +790,10 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, | |||
790 | * failed response to the next operation. If we don't | 790 | * failed response to the next operation. If we don't |
791 | * have enough room, fail with ERR_RESOURCE. | 791 | * have enough room, fail with ERR_RESOURCE. |
792 | */ | 792 | */ |
793 | /* FIXME - is slack_space *really* words, or bytes??? - neilb */ | 793 | slack_bytes = (char *)resp->end - (char *)resp->p; |
794 | slack_space = (char *)resp->end - (char *)resp->p; | 794 | if (slack_bytes < COMPOUND_SLACK_SPACE |
795 | if (slack_space < COMPOUND_SLACK_SPACE + COMPOUND_ERR_SLACK_SPACE) { | 795 | + COMPOUND_ERR_SLACK_SPACE) { |
796 | BUG_ON(slack_space < COMPOUND_ERR_SLACK_SPACE); | 796 | BUG_ON(slack_bytes < COMPOUND_ERR_SLACK_SPACE); |
797 | op->status = nfserr_resource; | 797 | op->status = nfserr_resource; |
798 | goto encode_op; | 798 | goto encode_op; |
799 | } | 799 | } |