aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2009-04-03 01:29:08 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-04-03 20:41:22 -0400
commit95ec28cda323104bbff64fc7ec8ee4c9042e51fa (patch)
treebde294959fdf288cd69e0f6f33570f62ec57dcbf /fs/nfsd/nfs4proc.c
parentc0d6fc8a2d55a8235c301aeb6d5254d5992895d1 (diff)
nfsd: dynamically skip encoded fattr bitmap in _nfsd4_verify
_nfsd4_verify currently skips 3 words from the encoded buffer begining. With support for 3-word attr bitmaps in nfsd41, nfsd4_encode_fattr may encode 1, 2, or 3 words, and not always 2 as it used to be, hence we need to find out where to skip using the encoded bitmap length. Note: This patch may be applied over pre-nfsd41 nfsd. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 52bb14debb30..937853f62834 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -775,7 +775,8 @@ _nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
775 if (status) 775 if (status)
776 goto out_kfree; 776 goto out_kfree;
777 777
778 p = buf + 3; 778 /* skip bitmap */
779 p = buf + 1 + ntohl(buf[0]);
779 status = nfserr_not_same; 780 status = nfserr_not_same;
780 if (ntohl(*p++) != verify->ve_attrlen) 781 if (ntohl(*p++) != verify->ve_attrlen)
781 goto out_kfree; 782 goto out_kfree;