All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH RFC 4/6] NFSD: Replace directory offset placeholder
Date: Thu, 27 Jan 2022 11:08:51 -0500	[thread overview]
Message-ID: <164329973085.5879.646571358048546056.stgit@bazille.1015granger.net> (raw)
In-Reply-To: <164329914731.5879.7791856151631542523.stgit@bazille.1015granger.net>

I'm about to remove NFS_OFFSET_MAX, so use a different symbolic
constant to mark the place of the offset field in directory
entries. OFFSET_MAX has the same value as NFS_OFFSET_MAX.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 fs/nfsd/nfs3xdr.c |    2 +-
 fs/nfsd/nfs4xdr.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index 2e47a07029f1..0293b8d65f10 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -1060,7 +1060,7 @@ svcxdr_encode_entry3_common(struct nfsd3_readdirres *resp, const char *name,
 		return false;
 	/* cookie */
 	resp->cookie_offset = dirlist->len;
-	if (xdr_stream_encode_u64(xdr, NFS_OFFSET_MAX) < 0)
+	if (xdr_stream_encode_u64(xdr, OFFSET_MAX) < 0)
 		return false;
 
 	return true;
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 7d2217cdaeaa..64d73b750491 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3505,7 +3505,7 @@ nfsd4_encode_dirent(void *ccdv, const char *name, int namlen,
 	p = xdr_reserve_space(xdr, 3*4 + namlen);
 	if (!p)
 		goto fail;
-	p = xdr_encode_hyper(p, NFS_OFFSET_MAX);    /* offset of next entry */
+	p = xdr_encode_hyper(p, OFFSET_MAX);        /* offset of next entry */
 	p = xdr_encode_array(p, name, namlen);      /* name length & name */
 
 	nfserr = nfsd4_encode_dirent_fattr(xdr, cd, name, namlen);


  parent reply	other threads:[~2022-01-27 16:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 16:08 [PATCH RFC 0/6] NFSD size, offset, and count sanity Chuck Lever
2022-01-27 16:08 ` [PATCH RFC 1/6] NFSD: Fix NFSv4 SETATTR's handling of large file sizes Chuck Lever
2022-01-28  0:36   ` Dave Chinner
2022-01-28  1:48     ` Chuck Lever III
2022-02-09 21:55       ` Dave Chinner
2022-01-27 16:08 ` [PATCH RFC 2/6] NFSD: Fix NFSv3 " Chuck Lever
2022-01-27 16:08 ` [PATCH RFC 3/6] NFSD: COMMIT operations must not return NFS?ERR_INVAL Chuck Lever
2022-01-27 16:08 ` Chuck Lever [this message]
2022-01-27 16:08 ` [PATCH RFC 5/6] NFSD: Remove NFS_OFFSET_MAX Chuck Lever
2022-01-27 16:09 ` [PATCH RFC 6/6] NFSD: Clamp WRITE offsets Chuck Lever
2022-01-27 18:13 ` [PATCH RFC 0/6] NFSD size, offset, and count sanity Frank Filz

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=164329973085.5879.646571358048546056.stgit@bazille.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --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.