add support for kernel flag FUSE_HAS_EXPIRE_ONLY
authorHereThereBeDragons <HereThereBeDragons@users.noreply.github.com>
Wed, 6 Dec 2023 14:37:38 +0000 (15:37 +0100)
committerNikolaus Rath <Nikolaus@rath.org>
Mon, 29 Jan 2024 08:43:58 +0000 (08:43 +0000)
lib/fuse_lowlevel.c

index def191898f450f6f3f0f10e064ca30ccd4cf95cc..d8c0cd1498332559c80ea71d029f3fbc9b107cad 100644 (file)
@@ -2021,7 +2021,7 @@ void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
                }
                if (inargflags & FUSE_DIRECT_IO_ALLOW_MMAP)
                        se->conn.capable |= FUSE_CAP_DIRECT_IO_ALLOW_MMAP;
-               if (arg->minor >= 38)
+               if (arg->minor >= 38 || (inargflags & FUSE_HAS_EXPIRE_ONLY))
                        se->conn.capable |= FUSE_CAP_EXPIRE_ONLY;
        } else {
                se->conn.max_readahead = 0;