projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[BRIDGE]: Fix locking of set path cost.
[powerpc.git]
/
fs
/
nfsd
/
nfs3acl.c
diff --git
a/fs/nfsd/nfs3acl.c
b/fs/nfsd/nfs3acl.c
index
16e10c1
..
3e3f2de
100644
(file)
--- a/
fs/nfsd/nfs3acl.c
+++ b/
fs/nfsd/nfs3acl.c
@@
-19,7
+19,7
@@
/*
* NULL call.
*/
/*
* NULL call.
*/
-static
int
+static
__be32
nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
{
return nfs_ok;
nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
{
return nfs_ok;
@@
-28,12
+28,12
@@
nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
/*
* Get the Access and/or Default ACL of a file.
*/
/*
* Get the Access and/or Default ACL of a file.
*/
-static
int
nfsd3_proc_getacl(struct svc_rqst * rqstp,
+static
__be32
nfsd3_proc_getacl(struct svc_rqst * rqstp,
struct nfsd3_getaclargs *argp, struct nfsd3_getaclres *resp)
{
svc_fh *fh;
struct posix_acl *acl;
struct nfsd3_getaclargs *argp, struct nfsd3_getaclres *resp)
{
svc_fh *fh;
struct posix_acl *acl;
-
int
nfserr = 0;
+
__be32
nfserr = 0;
fh = fh_copy(&resp->fh, &argp->fh);
if ((nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP)))
fh = fh_copy(&resp->fh, &argp->fh);
if ((nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP)))
@@
-93,12
+93,12
@@
fail:
/*
* Set the Access and/or Default ACL of a file.
*/
/*
* Set the Access and/or Default ACL of a file.
*/
-static
int
nfsd3_proc_setacl(struct svc_rqst * rqstp,
+static
__be32
nfsd3_proc_setacl(struct svc_rqst * rqstp,
struct nfsd3_setaclargs *argp,
struct nfsd3_attrstat *resp)
{
svc_fh *fh;
struct nfsd3_setaclargs *argp,
struct nfsd3_attrstat *resp)
{
svc_fh *fh;
-
int
nfserr = 0;
+
__be32
nfserr = 0;
fh = fh_copy(&resp->fh, &argp->fh);
nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR);
fh = fh_copy(&resp->fh, &argp->fh);
nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR);
@@
-122,7
+122,7
@@
static int nfsd3_proc_setacl(struct svc_rqst * rqstp,
/*
* XDR decode functions
*/
/*
* XDR decode functions
*/
-static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp,
u
32 *p,
+static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp,
__be
32 *p,
struct nfsd3_getaclargs *args)
{
if (!(p = nfs3svc_decode_fh(p, &args->fh)))
struct nfsd3_getaclargs *args)
{
if (!(p = nfs3svc_decode_fh(p, &args->fh)))
@@
-133,7
+133,7
@@
static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, u32 *p,
}
}
-static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp,
u
32 *p,
+static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp,
__be
32 *p,
struct nfsd3_setaclargs *args)
{
struct kvec *head = rqstp->rq_arg.head;
struct nfsd3_setaclargs *args)
{
struct kvec *head = rqstp->rq_arg.head;
@@
-163,7
+163,7
@@
static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, u32 *p,
*/
/* GETACL */
*/
/* GETACL */
-static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp,
u
32 *p,
+static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp,
__be
32 *p,
struct nfsd3_getaclres *resp)
{
struct dentry *dentry = resp->fh.fh_dentry;
struct nfsd3_getaclres *resp)
{
struct dentry *dentry = resp->fh.fh_dentry;
@@
-171,21
+171,21
@@
static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, u32 *p,
p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh);
if (resp->status == 0 && dentry && dentry->d_inode) {
struct inode *inode = dentry->d_inode;
p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh);
if (resp->status == 0 && dentry && dentry->d_inode) {
struct inode *inode = dentry->d_inode;
- int w = nfsacl_size(
- (resp->mask & NFS_ACL) ? resp->acl_access : NULL,
- (resp->mask & NFS_DFACL) ? resp->acl_default : NULL);
struct kvec *head = rqstp->rq_res.head;
unsigned int base;
int n;
struct kvec *head = rqstp->rq_res.head;
unsigned int base;
int n;
+ int w;
*p++ = htonl(resp->mask);
if (!xdr_ressize_check(rqstp, p))
return 0;
base = (char *)p - (char *)head->iov_base;
*p++ = htonl(resp->mask);
if (!xdr_ressize_check(rqstp, p))
return 0;
base = (char *)p - (char *)head->iov_base;
- rqstp->rq_res.page_len = w;
+ rqstp->rq_res.page_len = w = nfsacl_size(
+ (resp->mask & NFS_ACL) ? resp->acl_access : NULL,
+ (resp->mask & NFS_DFACL) ? resp->acl_default : NULL);
while (w > 0) {
while (w > 0) {
- if (!
svc_take_res_page(rqstp)
)
+ if (!
rqstp->rq_respages[rqstp->rq_resused++]
)
return 0;
w -= PAGE_SIZE;
}
return 0;
w -= PAGE_SIZE;
}
@@
-208,7
+208,7
@@
static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, u32 *p,
}
/* SETACL */
}
/* SETACL */
-static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp,
u
32 *p,
+static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp,
__be
32 *p,
struct nfsd3_attrstat *resp)
{
p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh);
struct nfsd3_attrstat *resp)
{
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,
/*
* XDR release functions
*/
/*
* XDR release functions
*/
-static int nfs3svc_release_getacl(struct svc_rqst *rqstp,
u
32 *p,
+static int nfs3svc_release_getacl(struct svc_rqst *rqstp,
__be
32 *p,
struct nfsd3_getaclres *resp)
{
fh_put(&resp->fh);
struct nfsd3_getaclres *resp)
{
fh_put(&resp->fh);
@@
-263,5
+263,6
@@
struct svc_version nfsd_acl_version3 = {
.vs_proc = nfsd_acl_procedures3,
.vs_dispatch = nfsd_dispatch,
.vs_xdrsize = NFS3_SVC_XDRSIZE,
.vs_proc = nfsd_acl_procedures3,
.vs_dispatch = nfsd_dispatch,
.vs_xdrsize = NFS3_SVC_XDRSIZE,
+ .vs_hidden = 1,
};
};