[PATCH v2 0/2] fuse: schedule dentry_tree_work only between dentry tree init and cleanup

From: Sang-Heon Jeon

Date: Fri Nov 20 2026 - 10:01:54 EST


Hello,

inval_wq_set() schedules dentry_tree_work when inval_wq is enabled, but
it can be called before fuse_dentry_tree_init() and after
fuse_dentry_tree_cleanup(). This series makes inval_wq_set() schedule
the work only between the two.

Patch 1 defers scheduling the work until fuse_dentry_tree_init() sets
it up.

Patch 2 does not schedule the work after fuse_dentry_tree_cleanup()
cancels it.

Both patches hold kernel_param_lock(), because a sysfs write can call
inval_wq_set() at the same time.

---
Changes from v1 [1]
- Hold kernel_param_lock() in fuse_dentry_tree_init()
- Add patch 2 to not schedule the work after fuse_dentry_tree_cleanup()

[1] https://lore.kernel.org/all/20261110150250.71520-1-ekffu200098@xxxxxxxxx/
---

Sang-Heon Jeon (2):
fuse: defer dentry_tree_work until fuse_dentry_tree_init()
fuse: do not schedule dentry_tree_work after
fuse_dentry_tree_cleanup()

fs/fuse/dir.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)


base-commit: ab9787d7e66ac7e6e94fc975b37c5b56fff98ca9
--
2.53.0