From: Kundan Kumar Date: Fri, 13 Feb 2026 05:46:34 +0000 (+0530) Subject: nfs: stop using writeback internals for WB_WRITEBACK accounting X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fd15b9c6ec8a3a6105a3295af52adea6d6e4cf59;p=thirdparty%2Fkernel%2Flinux.git nfs: stop using writeback internals for WB_WRITEBACK accounting Convert NFS WB_WRITEBACK accounting to writeback helper, eliminating direct access to writeback. Suggested-by: Christoph Hellwig Signed-off-by: Kundan Kumar Signed-off-by: Anuj Gupta Link: https://patch.msgid.link/20260213054634.79785-5-kundan.kumar@samsung.com Signed-off-by: Christian Brauner --- diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 63e09dfc27a8f..fc54563771604 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -859,7 +859,7 @@ static inline void nfs_folio_mark_unstable(struct folio *folio, * writeback is happening on the server now. */ node_stat_mod_folio(folio, NR_WRITEBACK, nr); - wb_stat_mod(&inode_to_bdi(inode)->wb, WB_WRITEBACK, nr); + bdi_wb_stat_mod(inode, WB_WRITEBACK, nr); __mark_inode_dirty(inode, I_DIRTY_DATASYNC); } } diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 2d0e4a765aeb7..7f5ccc850d368 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -872,8 +872,7 @@ static void nfs_folio_clear_commit(struct folio *folio) long nr = folio_nr_pages(folio); node_stat_mod_folio(folio, NR_WRITEBACK, -nr); - wb_stat_mod(&inode_to_bdi(folio->mapping->host)->wb, - WB_WRITEBACK, -nr); + bdi_wb_stat_mod(folio->mapping->host, WB_WRITEBACK, -nr); } }