aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs3acl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c
index fcad2895ddb0..3e3f2de82c36 100644
--- a/fs/nfsd/nfs3acl.c
+++ b/fs/nfsd/nfs3acl.c
@@ -171,19 +171,19 @@ static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
171 p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh); 171 p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh);
172 if (resp->status == 0 && dentry && dentry->d_inode) { 172 if (resp->status == 0 && dentry && dentry->d_inode) {
173 struct inode *inode = dentry->d_inode; 173 struct inode *inode = dentry->d_inode;
174 int w = nfsacl_size(
175 (resp->mask & NFS_ACL) ? resp->acl_access : NULL,
176 (resp->mask & NFS_DFACL) ? resp->acl_default : NULL);
177 struct kvec *head = rqstp->rq_res.head; 174 struct kvec *head = rqstp->rq_res.head;
178 unsigned int base; 175 unsigned int base;
179 int n; 176 int n;
177 int w;
180 178
181 *p++ = htonl(resp->mask); 179 *p++ = htonl(resp->mask);
182 if (!xdr_ressize_check(rqstp, p)) 180 if (!xdr_ressize_check(rqstp, p))
183 return 0; 181 return 0;
184 base = (char *)p - (char *)head->iov_base; 182 base = (char *)p - (char *)head->iov_base;
185 183
186 rqstp->rq_res.page_len = w; 184 rqstp->rq_res.page_len = w = nfsacl_size(
185 (resp->mask & NFS_ACL) ? resp->acl_access : NULL,
186 (resp->mask & NFS_DFACL) ? resp->acl_default : NULL);
187 while (w > 0) { 187 while (w > 0) {
188 if (!rqstp->rq_respages[rqstp->rq_resused++]) 188 if (!rqstp->rq_respages[rqstp->rq_resused++])
189 return 0; 189 return 0;