From e57101991156aaba97c630f38e880f0d4012edcd Mon Sep 17 00:00:00 2001 From: "J.Bruce Fields" Date: Wed, 13 Dec 2006 00:35:20 -0800 Subject: [PATCH] knfsd: nfsd4: clarify units of COMPOUND_SLACK_SPACE A comment here incorrectly states that "slack_space" is measured in words, not bytes. Remove the comment, and adjust a variable name and a few comments to clarify the situation. This is pure cleanup; there should be no change in functionality. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/nfsd/nfs4proc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fs/nfsd') 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, struct svc_fh *current_fh = NULL; struct svc_fh *save_fh = NULL; struct nfs4_stateowner *replay_owner = NULL; - int slack_space; /* in words, not bytes! */ + int slack_bytes; __be32 status; status = nfserr_resource; @@ -790,10 +790,10 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, * failed response to the next operation. If we don't * have enough room, fail with ERR_RESOURCE. */ -/* FIXME - is slack_space *really* words, or bytes??? - neilb */ - slack_space = (char *)resp->end - (char *)resp->p; - if (slack_space < COMPOUND_SLACK_SPACE + COMPOUND_ERR_SLACK_SPACE) { - BUG_ON(slack_space < COMPOUND_ERR_SLACK_SPACE); + slack_bytes = (char *)resp->end - (char *)resp->p; + if (slack_bytes < COMPOUND_SLACK_SPACE + + COMPOUND_ERR_SLACK_SPACE) { + BUG_ON(slack_bytes < COMPOUND_ERR_SLACK_SPACE); op->status = nfserr_resource; goto encode_op; } -- cgit v1.2.3-59-g8ed1b