diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-12-14 17:57:50 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-01-23 18:17:35 -0500 |
commit | 84822d0b3bc5a74a4290727dd1ab4fc7dcd6a348 (patch) | |
tree | 4d63b1766e3eb7944395073506e0454eed2e22dd /fs/nfsd/nfs4proc.c | |
parent | d1c3ed669a2d452cacfb48c2d171a1f364dae2ed (diff) | |
download | linux-3.10-84822d0b3bc5a74a4290727dd1ab4fc7dcd6a348.tar.gz linux-3.10-84822d0b3bc5a74a4290727dd1ab4fc7dcd6a348.tar.bz2 linux-3.10-84822d0b3bc5a74a4290727dd1ab4fc7dcd6a348.zip |
nfsd4: simplify nfsd4_encode_fattr interface slightly
It seems slightly simpler to make nfsd4_encode_fattr rather than its
callers responsible for advancing the write pointer on success.
(Also: the count == 0 check in the verify case looks superfluous.
Running out of buffer space is really the only reason fattr encoding
should fail with eresource.)
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 9d1c5dba2bb..ae73175e6e6 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -993,14 +993,15 @@ _nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, if (!buf) return nfserr_jukebox; + p = buf; status = nfsd4_encode_fattr(&cstate->current_fh, cstate->current_fh.fh_export, - cstate->current_fh.fh_dentry, buf, - &count, verify->ve_bmval, + cstate->current_fh.fh_dentry, &p, + count, verify->ve_bmval, rqstp, 0); /* this means that nfsd4_encode_fattr() ran out of space */ - if (status == nfserr_resource && count == 0) + if (status == nfserr_resource) status = nfserr_not_same; if (status) goto out_kfree; |