Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e57101991156aaba97c630f38e880f0d4012edcd
Commit:     e57101991156aaba97c630f38e880f0d4012edcd
Parent:     b797b5beac966df5c5d96c0d39fe366f57135343
Author:     J.Bruce Fields <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 13 00:35:20 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Dec 13 09:05:53 2006 -0800

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/nfsd/nfs4proc.c        |   10 +++++-----
 include/linux/nfsd/nfsd.h |    4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 50bc942..793a0b0 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;
                }
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index edb54c3..0727774 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -275,12 +275,12 @@ static inline int is_fsid(struct svc_fh *fh, struct 
knfsd_fh *reffh)
  * we might process an operation with side effects, and be unable to
  * tell the client that the operation succeeded.
  *
- * COMPOUND_SLACK_SPACE - this is the minimum amount of buffer space
+ * COMPOUND_SLACK_SPACE - this is the minimum bytes of buffer space
  * needed to encode an "ordinary" _successful_ operation.  (GETATTR,
  * READ, READDIR, and READLINK have their own buffer checks.)  if we
  * fall below this level, we fail the next operation with NFS4ERR_RESOURCE.
  *
- * COMPOUND_ERR_SLACK_SPACE - this is the minimum amount of buffer space
+ * COMPOUND_ERR_SLACK_SPACE - this is the minimum bytes of buffer space
  * needed to encode an operation which has failed with NFS4ERR_RESOURCE.
  * care is taken to ensure that we never fall below this level for any
  * reason.
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to