[PATCH] NFS: enable pNFS verifier clearing for modular NFSv4

From: hpp.iscas

Date: Sat Sep 05 2026 - 09:35:57 EST


CONFIG_NFS_V4 is tristate. When it is set to m, CONFIG_NFS_V4_MODULE
is defined instead of CONFIG_NFS_V4, so the current #ifdef selects the
empty nfs_clear_pnfs_ds_commit_verifiers() implementation. Direct-write
rescheduling then leaves the data-server commit verifiers unchanged.

Use IS_ENABLED() so the clearing helper is compiled for both built-in and
modular NFSv4 configurations.

Fixes: 7537db24806f ("NFS: Merge CONFIG_NFS_V4_1 with CONFIG_NFS_V4")
Signed-off-by: hpp.iscas <hppiscas@xxxxxxx>
---
fs/nfs/internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index abc81f5..11256dd 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -643,7 +643,7 @@ void nfs_pageio_stop_mirroring(struct nfs_pageio_descriptor *pgio);
int nfs_filemap_write_and_wait_range(struct address_space *mapping,
loff_t lstart, loff_t lend);

-#ifdef CONFIG_NFS_V4
+#if IS_ENABLED(CONFIG_NFS_V4)
static inline void
pnfs_bucket_clear_pnfs_ds_commit_verifiers(struct pnfs_commit_bucket *buckets,
unsigned int nbuckets)