From: Maximilian Heinzler Date: Sun, 12 Dec 2021 16:28:57 +0000 (+0100) Subject: Document possible NULL paths when directories are removed (#633) X-Git-Tag: fuse-3.11.0~14 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=48ae2e72b39b6a31cb2194f6f11786b7ca06aac6;p=qemu-gpiodev%2Flibfuse.git 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. --- 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