diff options
author | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
commit | c4366889dda8110247be59ca41fddb82951a8c26 (patch) | |
tree | 705c1a996bed8fd48ce94ff33ec9fd00f9b94875 /fs/nfsd/nfs3acl.c | |
parent | db2fb9db5735cc532fd4fc55e94b9a3c3750378e (diff) | |
parent | e1036502e5263851259d147771226161e5ccc85a (diff) |
Merge ../linus
Conflicts:
drivers/cpufreq/cpufreq.c
Diffstat (limited to 'fs/nfsd/nfs3acl.c')
-rw-r--r-- | fs/nfsd/nfs3acl.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c index d4bdc00c1169..3e3f2de82c36 100644 --- a/fs/nfsd/nfs3acl.c +++ b/fs/nfsd/nfs3acl.c | |||
@@ -19,7 +19,7 @@ | |||
19 | /* | 19 | /* |
20 | * NULL call. | 20 | * NULL call. |
21 | */ | 21 | */ |
22 | static int | 22 | static __be32 |
23 | nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) | 23 | nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) |
24 | { | 24 | { |
25 | return nfs_ok; | 25 | return nfs_ok; |
@@ -28,12 +28,12 @@ nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) | |||
28 | /* | 28 | /* |
29 | * Get the Access and/or Default ACL of a file. | 29 | * Get the Access and/or Default ACL of a file. |
30 | */ | 30 | */ |
31 | static int nfsd3_proc_getacl(struct svc_rqst * rqstp, | 31 | static __be32 nfsd3_proc_getacl(struct svc_rqst * rqstp, |
32 | struct nfsd3_getaclargs *argp, struct nfsd3_getaclres *resp) | 32 | struct nfsd3_getaclargs *argp, struct nfsd3_getaclres *resp) |
33 | { | 33 | { |
34 | svc_fh *fh; | 34 | svc_fh *fh; |
35 | struct posix_acl *acl; | 35 | struct posix_acl *acl; |
36 | int nfserr = 0; | 36 | __be32 nfserr = 0; |
37 | 37 | ||
38 | fh = fh_copy(&resp->fh, &argp->fh); | 38 | fh = fh_copy(&resp->fh, &argp->fh); |
39 | if ((nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP))) | 39 | if ((nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP))) |
@@ -93,12 +93,12 @@ fail: | |||
93 | /* | 93 | /* |
94 | * Set the Access and/or Default ACL of a file. | 94 | * Set the Access and/or Default ACL of a file. |
95 | */ | 95 | */ |
96 | static int nfsd3_proc_setacl(struct svc_rqst * rqstp, | 96 | static __be32 nfsd3_proc_setacl(struct svc_rqst * rqstp, |
97 | struct nfsd3_setaclargs *argp, | 97 | struct nfsd3_setaclargs *argp, |
98 | struct nfsd3_attrstat *resp) | 98 | struct nfsd3_attrstat *resp) |
99 | { | 99 | { |
100 | svc_fh *fh; | 100 | svc_fh *fh; |
101 | int nfserr = 0; | 101 | __be32 nfserr = 0; |
102 | 102 | ||
103 | fh = fh_copy(&resp->fh, &argp->fh); | 103 | fh = fh_copy(&resp->fh, &argp->fh); |
104 | nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR); | 104 | nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR); |
@@ -122,7 +122,7 @@ static int nfsd3_proc_setacl(struct svc_rqst * rqstp, | |||
122 | /* | 122 | /* |
123 | * XDR decode functions | 123 | * XDR decode functions |
124 | */ | 124 | */ |
125 | static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, u32 *p, | 125 | static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p, |
126 | struct nfsd3_getaclargs *args) | 126 | struct nfsd3_getaclargs *args) |
127 | { | 127 | { |
128 | if (!(p = nfs3svc_decode_fh(p, &args->fh))) | 128 | if (!(p = nfs3svc_decode_fh(p, &args->fh))) |
@@ -133,7 +133,7 @@ static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, u32 *p, | |||
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||
136 | static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, u32 *p, | 136 | static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p, |
137 | struct nfsd3_setaclargs *args) | 137 | struct nfsd3_setaclargs *args) |
138 | { | 138 | { |
139 | struct kvec *head = rqstp->rq_arg.head; | 139 | struct kvec *head = rqstp->rq_arg.head; |
@@ -163,7 +163,7 @@ static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, u32 *p, | |||
163 | */ | 163 | */ |
164 | 164 | ||
165 | /* GETACL */ | 165 | /* GETACL */ |
166 | static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, u32 *p, | 166 | static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p, |
167 | struct nfsd3_getaclres *resp) | 167 | struct nfsd3_getaclres *resp) |
168 | { | 168 | { |
169 | struct dentry *dentry = resp->fh.fh_dentry; | 169 | struct dentry *dentry = resp->fh.fh_dentry; |
@@ -171,19 +171,19 @@ static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, u32 *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; |
@@ -208,7 +208,7 @@ static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, u32 *p, | |||
208 | } | 208 | } |
209 | 209 | ||
210 | /* SETACL */ | 210 | /* SETACL */ |
211 | static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, u32 *p, | 211 | static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, __be32 *p, |
212 | struct nfsd3_attrstat *resp) | 212 | struct nfsd3_attrstat *resp) |
213 | { | 213 | { |
214 | p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh); | 214 | p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh); |
@@ -219,7 +219,7 @@ static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, u32 *p, | |||
219 | /* | 219 | /* |
220 | * XDR release functions | 220 | * XDR release functions |
221 | */ | 221 | */ |
222 | static int nfs3svc_release_getacl(struct svc_rqst *rqstp, u32 *p, | 222 | static int nfs3svc_release_getacl(struct svc_rqst *rqstp, __be32 *p, |
223 | struct nfsd3_getaclres *resp) | 223 | struct nfsd3_getaclres *resp) |
224 | { | 224 | { |
225 | fh_put(&resp->fh); | 225 | fh_put(&resp->fh); |