aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2015-11-03 12:25:34 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-11-03 12:33:01 -0500
commit8fbcf237439f841e7e9c4675790e08ea1c295bd3 (patch)
tree742a5defecd34c85ef1e388507cc67b751ff3648
parent118c9163562426face9ff0903f1cbd3e1a959ca9 (diff)
nfs: Remove unused xdr page offsets in getacl/setacl arguments
The arguments passed around for getacl and setacl xdr encoding, struct nfs_setaclargs and struct nfs_getaclargs, both contain an array of pages, an offset into the first page, and the length of the page data. The offset is unused as it is always zero; remove it. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
-rw-r--r--fs/nfs/nfs4proc.c5
-rw-r--r--fs/nfs/nfs4xdr.c4
-rw-r--r--include/linux/nfs_xdr.h2
3 files changed, 4 insertions, 7 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 87a081c6299d..7ed8f2cd97f8 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4603,7 +4603,7 @@ static inline int nfs4_server_supports_acls(struct nfs_server *server)
4603#define NFS4ACL_MAXPAGES DIV_ROUND_UP(XATTR_SIZE_MAX, PAGE_SIZE) 4603#define NFS4ACL_MAXPAGES DIV_ROUND_UP(XATTR_SIZE_MAX, PAGE_SIZE)
4604 4604
4605static int buf_to_pages_noslab(const void *buf, size_t buflen, 4605static int buf_to_pages_noslab(const void *buf, size_t buflen,
4606 struct page **pages, unsigned int *pgbase) 4606 struct page **pages)
4607{ 4607{
4608 struct page *newpage, **spages; 4608 struct page *newpage, **spages;
4609 int rc = 0; 4609 int rc = 0;
@@ -4747,7 +4747,6 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu
4747 goto out_free; 4747 goto out_free;
4748 4748
4749 args.acl_len = npages * PAGE_SIZE; 4749 args.acl_len = npages * PAGE_SIZE;
4750 args.acl_pgbase = 0;
4751 4750
4752 dprintk("%s buf %p buflen %zu npages %d args.acl_len %zu\n", 4751 dprintk("%s buf %p buflen %zu npages %d args.acl_len %zu\n",
4753 __func__, buf, buflen, npages, args.acl_len); 4752 __func__, buf, buflen, npages, args.acl_len);
@@ -4839,7 +4838,7 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl
4839 return -EOPNOTSUPP; 4838 return -EOPNOTSUPP;
4840 if (npages > ARRAY_SIZE(pages)) 4839 if (npages > ARRAY_SIZE(pages))
4841 return -ERANGE; 4840 return -ERANGE;
4842 i = buf_to_pages_noslab(buf, buflen, arg.acl_pages, &arg.acl_pgbase); 4841 i = buf_to_pages_noslab(buf, buflen, arg.acl_pages);
4843 if (i < 0) 4842 if (i < 0)
4844 return i; 4843 return i;
4845 nfs4_inode_return_delegation(inode); 4844 nfs4_inode_return_delegation(inode);
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 9f656791a338..22a1ddd4fe96 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1659,7 +1659,7 @@ encode_setacl(struct xdr_stream *xdr, struct nfs_setaclargs *arg, struct compoun
1659 *p = cpu_to_be32(FATTR4_WORD0_ACL); 1659 *p = cpu_to_be32(FATTR4_WORD0_ACL);
1660 p = reserve_space(xdr, 4); 1660 p = reserve_space(xdr, 4);
1661 *p = cpu_to_be32(arg->acl_len); 1661 *p = cpu_to_be32(arg->acl_len);
1662 xdr_write_pages(xdr, arg->acl_pages, arg->acl_pgbase, arg->acl_len); 1662 xdr_write_pages(xdr, arg->acl_pages, 0, arg->acl_len);
1663} 1663}
1664 1664
1665static void 1665static void
@@ -2491,7 +2491,7 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
2491 encode_getattr_two(xdr, FATTR4_WORD0_ACL, 0, &hdr); 2491 encode_getattr_two(xdr, FATTR4_WORD0_ACL, 0, &hdr);
2492 2492
2493 xdr_inline_pages(&req->rq_rcv_buf, replen << 2, 2493 xdr_inline_pages(&req->rq_rcv_buf, replen << 2,
2494 args->acl_pages, args->acl_pgbase, args->acl_len); 2494 args->acl_pages, 0, args->acl_len);
2495 2495
2496 encode_nops(&hdr); 2496 encode_nops(&hdr);
2497} 2497}
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 4728e7e5fc49..570d630f98ae 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -705,7 +705,6 @@ struct nfs_setaclargs {
705 struct nfs4_sequence_args seq_args; 705 struct nfs4_sequence_args seq_args;
706 struct nfs_fh * fh; 706 struct nfs_fh * fh;
707 size_t acl_len; 707 size_t acl_len;
708 unsigned int acl_pgbase;
709 struct page ** acl_pages; 708 struct page ** acl_pages;
710}; 709};
711 710
@@ -717,7 +716,6 @@ struct nfs_getaclargs {
717 struct nfs4_sequence_args seq_args; 716 struct nfs4_sequence_args seq_args;
718 struct nfs_fh * fh; 717 struct nfs_fh * fh;
719 size_t acl_len; 718 size_t acl_len;
720 unsigned int acl_pgbase;
721 struct page ** acl_pages; 719 struct page ** acl_pages;
722}; 720};
723 721