Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44499
b: refs/heads/master
c: e571019
h: refs/heads/master
i:
  44497: fe9796e
  44495: 97c12c8
v: v3
  • Loading branch information
J.Bruce Fields authored and Linus Torvalds committed Dec 13, 2006
1 parent 1220c51 commit 3391294
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b797b5beac966df5c5d96c0d39fe366f57135343
refs/heads/master: e57101991156aaba97c630f38e880f0d4012edcd
10 changes: 5 additions & 5 deletions trunk/fs/nfsd/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/nfsd/nfsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3391294

Please sign in to comment.