linux/fs/nfs/flexfilelayout
Mike Snitzer 8db4a1d146 NFSv4/flexfiles: fix to allocate mirror->dss before use
Move mirror_array's dss_count initialization and dss allocation to
ff_layout_alloc_mirror(), just before the loop that initializes each
nfs4_ff_layout_ds_stripe's nfs_file_localio.

Also handle NULL return from kcalloc() and remove one level of indent
in ff_layout_alloc_mirror().

This commit fixes dangling nfsd_serv refcount issues seen when using
NFS LOCALIO and then attempting to stop the NFSD service.

Fixes: 20b1d75fb8 ("NFSv4/flexfiles: Add support for striped layouts")
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
2025-10-13 14:33:00 -04:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
flexfilelayout.c NFSv4/flexfiles: fix to allocate mirror->dss before use 2025-10-13 14:33:00 -04:00
flexfilelayout.h NFSv4/flexfiles: Add support for striped layouts 2025-09-26 15:43:40 -04:00
flexfilelayoutdev.c NFSv4/flexfiles: Update low level helper functions to be DS stripe aware. 2025-09-26 15:35:02 -04:00