nfsd: fix handling of NFSEXP_PNFS in the netlink codepath

The rework of how block layouts were checked moved the check for
NFSEXP_PNFS out of nfsd4_setup_layout_type() and into the callers. That
patch didn't account for the new call in nfsd4_setup_layout_type().

Cc: Christoph Hellwig <hch@lst.de>
Fixes: da9baa5470 ("exportfs,nfsd: rework checking for layout-based block device access support")
Cc: stable@vger.kernel.org
Reported-by: Olga Kornievskaia <okorniev@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260414-pnfs-exp-fix-v1-1-9face14c16c2@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
This commit is contained in:
Jeff Layton
2026-09-04 13:14:44 -04:00
committed by Chuck Lever
parent 46db3c8a1b
commit f76017a766
+2 -1
View File
@@ -1006,7 +1006,8 @@ static int nfsd_nl_parse_one_export(struct cache_detail *cd,
goto out_uuid;
err = 0;
nfsd4_setup_layout_type(&exp);
if (exp.ex_flags & NFSEXP_PNFS)
nfsd4_setup_layout_type(&exp);
}
expp = svc_export_lookup(&exp);