Linux NFS development
 help / color / mirror / Atom feed
From: Jonathan Curley <jcurley@purestorage.com>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: Jonathan Curley <jcurley@purestorage.com>, linux-nfs@vger.kernel.org
Subject: [PATCH 1/9] NFSv4/flexfiles: Remove cred local variable dependency
Date: Mon, 18 Aug 2025 22:07:42 +0000	[thread overview]
Message-ID: <20250818220750.47085-2-jcurley@purestorage.com> (raw)
In-Reply-To: <20250818220750.47085-1-jcurley@purestorage.com>

No-op preparation change to remove dependency on cred local
variable. Subsequent striping diff has a cred per stripe so this local
variable can't be trusted to be the same.

Signed-off-by: Jonathan Curley <jcurley@purestorage.com>
---
 fs/nfs/flexfilelayout/flexfilelayout.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 4bea008dbebd..a437d20ebcdf 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -532,10 +532,10 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh,
 		if (mirror != fls->mirror_array[i]) {
 			/* swap cred ptrs so free_mirror will clean up old */
 			if (lgr->range.iomode == IOMODE_READ) {
-				cred = xchg(&mirror->ro_cred, cred);
+				cred = xchg(&mirror->ro_cred, fls->mirror_array[i]->ro_cred);
 				rcu_assign_pointer(fls->mirror_array[i]->ro_cred, cred);
 			} else {
-				cred = xchg(&mirror->rw_cred, cred);
+				cred = xchg(&mirror->rw_cred, fls->mirror_array[i]->rw_cred);
 				rcu_assign_pointer(fls->mirror_array[i]->rw_cred, cred);
 			}
 			ff_layout_free_mirror(fls->mirror_array[i]);
-- 
2.34.1


  reply	other threads:[~2025-08-18 22:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 22:07 [PATCH 0/9] NFSv4/flexfiles: Add support for striped layouts Jonathan Curley
2025-08-18 22:07 ` Jonathan Curley [this message]
2025-08-18 22:07 ` [PATCH 2/9] NFSv4/flexfiles: Use ds_commit_idx when marking a write commit Jonathan Curley
2025-08-18 22:07 ` [PATCH 3/9] NFSv4/flexfiles: Add data structure support for striped layouts Jonathan Curley
2025-08-18 22:07 ` [PATCH 4/9] NFSv4/flexfiles: Update low level helper functions to be DS stripe aware Jonathan Curley
2025-08-20  1:52   ` kernel test robot
2025-08-18 22:07 ` [PATCH 5/9] NFSv4/flexfiles: Read path updates for striped layouts Jonathan Curley
2025-08-18 22:07 ` [PATCH 6/9] NFSv4/flexfiles: Commit " Jonathan Curley
2025-08-18 22:07 ` [PATCH 7/9] NFSv4/flexfiles: Write " Jonathan Curley
2025-08-18 22:07 ` [PATCH 8/9] NFSv4/flexfiles: Update layout stats & error paths " Jonathan Curley
2025-08-18 22:07 ` [PATCH 9/9] NFSv4/flexfiles: Add support " Jonathan Curley

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=20250818220750.47085-2-jcurley@purestorage.com \
    --to=jcurley@purestorage.com \
    --cc=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox