diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs2acl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c index e3eca0816986..edde5dc5f796 100644 --- a/fs/nfsd/nfs2acl.c +++ b/fs/nfsd/nfs2acl.c | |||
@@ -222,12 +222,10 @@ static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p, | |||
222 | { | 222 | { |
223 | struct dentry *dentry = resp->fh.fh_dentry; | 223 | struct dentry *dentry = resp->fh.fh_dentry; |
224 | struct inode *inode = dentry->d_inode; | 224 | struct inode *inode = dentry->d_inode; |
225 | int w = nfsacl_size( | ||
226 | (resp->mask & NFS_ACL) ? resp->acl_access : NULL, | ||
227 | (resp->mask & NFS_DFACL) ? resp->acl_default : NULL); | ||
228 | struct kvec *head = rqstp->rq_res.head; | 225 | struct kvec *head = rqstp->rq_res.head; |
229 | unsigned int base; | 226 | unsigned int base; |
230 | int n; | 227 | int n; |
228 | int w; | ||
231 | 229 | ||
232 | if (dentry == NULL || dentry->d_inode == NULL) | 230 | if (dentry == NULL || dentry->d_inode == NULL) |
233 | return 0; | 231 | return 0; |
@@ -239,7 +237,9 @@ static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p, | |||
239 | return 0; | 237 | return 0; |
240 | base = (char *)p - (char *)head->iov_base; | 238 | base = (char *)p - (char *)head->iov_base; |
241 | 239 | ||
242 | rqstp->rq_res.page_len = w; | 240 | rqstp->rq_res.page_len = w = nfsacl_size( |
241 | (resp->mask & NFS_ACL) ? resp->acl_access : NULL, | ||
242 | (resp->mask & NFS_DFACL) ? resp->acl_default : NULL); | ||
243 | while (w > 0) { | 243 | while (w > 0) { |
244 | if (!rqstp->rq_respages[rqstp->rq_resused++]) | 244 | if (!rqstp->rq_respages[rqstp->rq_resused++]) |
245 | return 0; | 245 | return 0; |