Skip to content

Commit fec80af

Browse files
Jonathan CurleyAnna Schumaker
authored andcommitted
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 <jcurley@purestorage.com> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
1 parent a890a2e commit fec80af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/nfs/flexfilelayout/flexfilelayout.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,10 +532,10 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh,
532532
if (mirror != fls->mirror_array[i]) {
533533
/* swap cred ptrs so free_mirror will clean up old */
534534
if (lgr->range.iomode == IOMODE_READ) {
535-
cred = xchg(&mirror->ro_cred, cred);
535+
cred = xchg(&mirror->ro_cred, fls->mirror_array[i]->ro_cred);
536536
rcu_assign_pointer(fls->mirror_array[i]->ro_cred, cred);
537537
} else {
538-
cred = xchg(&mirror->rw_cred, cred);
538+
cred = xchg(&mirror->rw_cred, fls->mirror_array[i]->rw_cred);
539539
rcu_assign_pointer(fls->mirror_array[i]->rw_cred, cred);
540540
}
541541
ff_layout_free_mirror(fls->mirror_array[i]);

0 commit comments

Comments
 (0)