From 271a4324a7472c1599383d18d0b0386f8f9d49eb Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Sun, 29 Nov 2026 23:10:57 -0500 Subject: [PATCH] refactor: use free_path_and_update_stat in setattr setattr inlined a copy of the helper getattr uses. Call it instead. Unlike getattr, setattr does not turn a vanished node into ESTALE, so the helper's result is ignored there, as before. --- vendored/libfuse/lib/fuse.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/vendored/libfuse/lib/fuse.cpp b/vendored/libfuse/lib/fuse.cpp index 9208e8ef..6f5f2b97 100644 --- a/vendored/libfuse/lib/fuse.cpp +++ b/vendored/libfuse/lib/fuse.cpp @@ -1766,16 +1766,9 @@ fuse_lib_setattr(fuse_req_t *req_, bool stat_updated = false; if(!err && (fusepath != NULL)) { - node_t *node; - mutex_lock(f.lock); - unlock_path(hdr_->nodeid,NULL,NULL); - node = get_node(hdr_->nodeid); - if(node) - update_stat(node,&stbuf); - if(f.lockq) - wake_up_queued(); - mutex_unlock(f.lock); - free(fusepath); + // Unlike getattr a vanished node is not turned into ESTALE + // here, so the helper's result is deliberately ignored. + free_path_and_update_stat(hdr_->nodeid,fusepath,&stbuf); stat_updated = true; } else