aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs3acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs3acl.c')
-rw-r--r--fs/nfsd/nfs3acl.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c
index 16e10c170aed..fcad2895ddb0 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 */
22static int 22static __be32
23nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) 23nfsd3_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 */
31static int nfsd3_proc_getacl(struct svc_rqst * rqstp, 31static __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 */
96static int nfsd3_proc_setacl(struct svc_rqst * rqstp, 96static __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 */
125static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, u32 *p, 125static 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
136static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, u32 *p, 136static 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 */
166static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, u32 *p, 166static 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;
@@ -185,7 +185,7 @@ static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, u32 *p,
185 185
186 rqstp->rq_res.page_len = w; 186 rqstp->rq_res.page_len = w;
187 while (w > 0) { 187 while (w > 0) {
188 if (!svc_take_res_page(rqstp)) 188 if (!rqstp->rq_respages[rqstp->rq_resused++])
189 return 0; 189 return 0;
190 w -= PAGE_SIZE; 190 w -= PAGE_SIZE;
191 } 191 }
@@ -208,7 +208,7 @@ static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, u32 *p,
208} 208}
209 209
210/* SETACL */ 210/* SETACL */
211static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, u32 *p, 211static 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 */
222static int nfs3svc_release_getacl(struct svc_rqst *rqstp, u32 *p, 222static 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);
@@ -263,5 +263,6 @@ struct svc_version nfsd_acl_version3 = {
263 .vs_proc = nfsd_acl_procedures3, 263 .vs_proc = nfsd_acl_procedures3,
264 .vs_dispatch = nfsd_dispatch, 264 .vs_dispatch = nfsd_dispatch,
265 .vs_xdrsize = NFS3_SVC_XDRSIZE, 265 .vs_xdrsize = NFS3_SVC_XDRSIZE,
266 .vs_hidden = 1,
266}; 267};
267 268