From: Jonathan Curley Date: Wed, 24 Sep 2025 16:20:42 +0000 (+0000) Subject: NFSv4/flexfiles: Remove cred local variable dependency X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fec80afc41afa3016421115427df8d00dc491ee5;p=thirdparty%2Fkernel%2Fstable.git NFSv4/flexfiles: Remove cred local variable dependency 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 Signed-off-by: Anna Schumaker --- diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 15658a0316bf7..2ad371faab983 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]);