From 33912944c7ff2372580ac184feaf2c77fad0c34a Mon Sep 17 00:00:00 2001 From: "J.Bruce Fields" Date: Wed, 13 Dec 2006 00:35:20 -0800 Subject: [PATCH] --- yaml --- r: 44499 b: refs/heads/master c: e57101991156aaba97c630f38e880f0d4012edcd h: refs/heads/master i: 44497: fe9796eabcb3f4db4c9b576c53a6a225694d3d70 44495: 97c12c82cfd9e74de439c867b548e2bbef2136c4 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4proc.c | 10 +++++----- trunk/include/linux/nfsd/nfsd.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index cfcaacc56a59..93d1e7b1490c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b797b5beac966df5c5d96c0d39fe366f57135343 +refs/heads/master: e57101991156aaba97c630f38e880f0d4012edcd diff --git a/trunk/fs/nfsd/nfs4proc.c b/trunk/fs/nfsd/nfs4proc.c index 50bc94243ca1..793a0b0a6cdd 100644 --- a/trunk/fs/nfsd/nfs4proc.c +++ b/trunk/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/trunk/include/linux/nfsd/nfsd.h b/trunk/include/linux/nfsd/nfsd.h index edb54c3171b3..0727774772ba 100644 --- a/trunk/include/linux/nfsd/nfsd.h +++ b/trunk/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.