Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1239903

[PATCH v9 40/43] nfs: Remove unused xdr page offsets in getacl/setacl arguments

From Andreas Gruenbacher <agruenba@redhat.com>
Newsgroups linux.kernel
Subject [PATCH v9 40/43] nfs: Remove unused xdr page offsets in getacl/setacl arguments
Date 2015-10-05 21:50 +0200
Message-ID <qgjVM-8O-19@gated-at.bofh.it> (permalink)
References <qgjM5-8oR-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 fs/nfs/nfs4proc.c       | 5 ++---
 fs/nfs/nfs4xdr.c        | 4 ++--
 include/linux/nfs_xdr.h | 2 --
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index f93b9cd..b3a6558 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4519,7 +4519,7 @@ static inline int nfs4_server_supports_acls(struct nfs_server *server)
 #define NFS4ACL_MAXPAGES DIV_ROUND_UP(XATTR_SIZE_MAX, PAGE_SIZE)
 
 static int buf_to_pages_noslab(const void *buf, size_t buflen,
-		struct page **pages, unsigned int *pgbase)
+		struct page **pages)
 {
 	struct page *newpage, **spages;
 	int rc = 0;
@@ -4663,7 +4663,6 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu
 		goto out_free;
 
 	args.acl_len = npages * PAGE_SIZE;
-	args.acl_pgbase = 0;
 
 	dprintk("%s  buf %p buflen %zu npages %d args.acl_len %zu\n",
 		__func__, buf, buflen, npages, args.acl_len);
@@ -4755,7 +4754,7 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl
 		return -EOPNOTSUPP;
 	if (npages > ARRAY_SIZE(pages))
 		return -ERANGE;
-	i = buf_to_pages_noslab(buf, buflen, arg.acl_pages, &arg.acl_pgbase);
+	i = buf_to_pages_noslab(buf, buflen, arg.acl_pages);
 	if (i < 0)
 		return i;
 	nfs4_inode_return_delegation(inode);
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 6f6d921..eefed15 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
 	*p = cpu_to_be32(FATTR4_WORD0_ACL);
 	p = reserve_space(xdr, 4);
 	*p = cpu_to_be32(arg->acl_len);
-	xdr_write_pages(xdr, arg->acl_pages, arg->acl_pgbase, arg->acl_len);
+	xdr_write_pages(xdr, arg->acl_pages, 0, arg->acl_len);
 }
 
 static void
@@ -2491,7 +2491,7 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
 	encode_getattr_two(xdr, FATTR4_WORD0_ACL, 0, &hdr);
 
 	xdr_inline_pages(&req->rq_rcv_buf, replen << 2,
-		args->acl_pages, args->acl_pgbase, args->acl_len);
+		args->acl_pages, 0, args->acl_len);
 
 	encode_nops(&hdr);
 }
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 52faf7e..090ade4 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -685,7 +685,6 @@ struct nfs_setaclargs {
 	struct nfs4_sequence_args	seq_args;
 	struct nfs_fh *			fh;
 	size_t				acl_len;
-	unsigned int			acl_pgbase;
 	struct page **			acl_pages;
 };
 
@@ -697,7 +696,6 @@ struct nfs_getaclargs {
 	struct nfs4_sequence_args 	seq_args;
 	struct nfs_fh *			fh;
 	size_t				acl_len;
-	unsigned int			acl_pgbase;
 	struct page **			acl_pages;
 };
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v9 00/43] Richacls Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:40 +0200
  [PATCH v9 22/43] richacl: acl editing helper functions Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:40 +0200
  [PATCH v9 12/43] vfs: Cache richacl in struct inode Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:40 +0200
  [PATCH v9 38/43] sunrpc: Add xdr_init_encode_pages Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 42/43] nfs: Add support for the v4.1 dacl attribute Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 34/43] nfsd: Add support for the MAY_CREATE_{FILE,DIR} permissions Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 35/43] richacl: Add support for unmapped identifiers Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 28/43] richacl: Apply the file masks to a richacl Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 39/43] nfs: Fix GETATTR bitmap verification Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 37/43] sunrpc: Allow to demand-allocate pages to encode into Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 36/43] ext4: Don't allow unmapped identifiers in richacls Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 40/43] nfs: Remove unused xdr page offsets in getacl/setacl arguments Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 41/43] nfs: Add richacl support Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 31/43] nfsd: Use richacls as internal acl representation Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 30/43] nfsd: Keep list of acls to dispose of in compoundargs Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 43/43] richacl: uapi header split Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 33/43] nfsd: Add support for the v4.1 dacl attribute Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 21:50 +0200
  [PATCH v9 32/43] nfsd: Add richacl support Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 22:00 +0200
  [PATCH v9 29/43] richacl: Create richacl from mode values Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 22:00 +0200
  [PATCH v9 11/43] vfs: Add get_richacl and set_richacl inode operations Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 22:10 +0200
  [PATCH v9 21/43] ext4: Add richacl feature flag Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 22:10 +0200
  [PATCH v9 07/43] richacl: Permission mapping functions Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 22:20 +0200
  [PATCH v9 02/43] vfs: Add MAY_CREATE_FILE and MAY_CREATE_DIR permission flags Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-05 22:20 +0200
  Re: [PATCH v9 00/43] Richacls Pavel Machek <pavel@ucw.cz> - 2015-10-06 11:10 +0200
    Re: [PATCH v9 00/43] Richacls Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-06 14:50 +0200
      Re: [PATCH v9 00/43] Richacls James Morris <jmorris@namei.org> - 2015-10-07 09:40 +0200
        Re: [PATCH v9 00/43] Richacls Austin S Hemmelgarn <ahferroin7@gmail.com> - 2015-10-07 15:30 +0200
        Re: [PATCH v9 00/43] Richacls Andreas Gruenbacher <agruenba@redhat.com> - 2015-10-07 15:50 +0200

csiph-web