[PATCH 0/3] NFS: Address build error when built with W=1

From: Peng Fan (OSS)

Date: Fri Feb 27 2026 - 03:21:23 EST


I built x86_64_defconfig with COMPILE_TEST=y and W=1, then saw
three build errors from fs/nfs: "error: variable set but not used"

Detailed info could be found in each patch commit log.

With the patchset, kernel build pass.

Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
---
Peng Fan (3):
NFS: flexfilelayout: return ERR_PTR from nfs4_ff_alloc_deviceid_node() and fix caller
NFS: flexfilelayout: Mark err as __maybe_unused in ff_layout_io_track_ds_error
NFS: nfs4proc: Mark ptr as __maybe_unused in nfs4_proc_create_session

fs/nfs/flexfilelayout/flexfilelayout.c | 4 ++--
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +-
fs/nfs/nfs4proc.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
base-commit: 7d6661873f6b54c75195780a40d66bad3d482d8f
change-id: 20260227-nfs-ff0f0f96fea3

Best regards,
--
Peng Fan <peng.fan@xxxxxxx>