All of lore.kernel.org
 help / color / mirror / Atom feed
From: schumaker.anna@gmail.com
To: linux-nfs@vger.kernel.org
Cc: Anna.Schumaker@Netapp.com
Subject: [PATCH v5 03/10] NFS: Use xdr_page_pos() in NFSv4 decode_getacl()
Date: Tue,  8 Sep 2020 12:25:06 -0400	[thread overview]
Message-ID: <20200908162513.508991-4-Anna.Schumaker@Netapp.com> (raw)
In-Reply-To: <20200908162513.508991-1-Anna.Schumaker@Netapp.com>

From: Anna Schumaker <Anna.Schumaker@Netapp.com>

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
---
 fs/nfs/nfs4xdr.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 0b3510f62623..3336ea3407a0 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -5308,7 +5308,6 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,
 	uint32_t attrlen,
 		 bitmap[3] = {0};
 	int status;
-	unsigned int pg_offset;
 
 	res->acl_len = 0;
 	if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0)
@@ -5316,9 +5315,6 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,
 
 	xdr_enter_page(xdr, xdr->buf->page_len);
 
-	/* Calculate the offset of the page data */
-	pg_offset = xdr->buf->head[0].iov_len;
-
 	if ((status = decode_attr_bitmap(xdr, bitmap)) != 0)
 		goto out;
 	if ((status = decode_attr_length(xdr, &attrlen, &savep)) != 0)
@@ -5331,7 +5327,7 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,
 		/* The bitmap (xdr len + bitmaps) and the attr xdr len words
 		 * are stored with the acl data to handle the problem of
 		 * variable length bitmaps.*/
-		res->acl_data_offset = xdr_stream_pos(xdr) - pg_offset;
+		res->acl_data_offset = xdr_page_pos(xdr);
 		res->acl_len = attrlen;
 
 		/* Check for receive buffer overflow */
-- 
2.28.0


  parent reply	other threads:[~2020-09-08 16:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08 16:25 [PATCH v5 00/10] NFS: Add support for the v4.2 READ_PLUS operation schumaker.anna
2020-09-08 16:25 ` [PATCH v5 01/10] SUNRPC: Split out a function for setting current page schumaker.anna
2020-09-08 16:25 ` [PATCH v5 02/10] SUNRPC: Implement a xdr_page_pos() function schumaker.anna
2020-09-08 16:25 ` schumaker.anna [this message]
2020-09-08 16:25 ` [PATCH v5 04/10] NFS: Add READ_PLUS data segment support schumaker.anna
2020-09-08 16:25 ` [PATCH v5 05/10] SUNRPC: Split out xdr_realign_pages() from xdr_align_pages() schumaker.anna
2020-09-08 16:25 ` [PATCH v5 06/10] SUNRPC: Split out _shift_data_right_tail() schumaker.anna
2020-09-08 16:25 ` [PATCH v5 07/10] SUNRPC: Add the ability to expand holes in data pages schumaker.anna
2020-09-08 16:25 ` [PATCH v5 08/10] NFS: Add READ_PLUS hole segment decoding schumaker.anna
2020-09-08 16:25 ` [PATCH v5 09/10] SUNRPC: Add an xdr_align_data() function schumaker.anna
2020-09-08 16:25 ` [PATCH v5 10/10] NFS: Decode a full READ_PLUS reply schumaker.anna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200908162513.508991-4-Anna.Schumaker@Netapp.com \
    --to=schumaker.anna@gmail.com \
    --cc=Anna.Schumaker@Netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.