From 48ae2e72b39b6a31cb2194f6f11786b7ca06aac6 Mon Sep 17 00:00:00 2001 From: Maximilian Heinzler Date: Sun, 12 Dec 2021 17:28:57 +0100 Subject: Document possible NULL paths when directories are removed (#633) When directories with open handles are removed, the releasedir and fsyncdir operations might be called with a NULL path. That is because there is no hiding behavior like for regular files and the nodes get removed immediately. --- include/fuse.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/fuse.h b/include/fuse.h index 9e6c633..a273b15 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -560,10 +560,16 @@ struct fuse_operations { struct fuse_file_info *, enum fuse_readdir_flags); /** Release directory + * + * If the directory has been removed after the call to opendir, the + * path parameter will be NULL. */ int (*releasedir) (const char *, struct fuse_file_info *); /** Synchronize directory contents + * + * If the directory has been removed after the call to opendir, the + * path parameter will be NULL. * * If the datasync parameter is non-zero, then only the user data * should be flushed, not the meta data -- cgit v1.2.1