]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
fuse2fs: disable renameat2
authorDarrick J. Wong <djwong@kernel.org>
Thu, 24 Apr 2025 21:44:25 +0000 (14:44 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 21 May 2025 14:25:07 +0000 (10:25 -0400)
Apparently fuse munged rename and renameat2 together into the same
upcall, so we actually have to filter out nonzero flags because
otherwise we do a regular rename for a RENAME_EXCHANGE/WHITEOUT, which
is not what the user asked for.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/174553065177.1160461.684615549721279410.stgit@frogsfrogsfrogs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/fuse2fs.c

index fcab88a7467b50925bb40d27c081b0f5ccb436b5..eb37021722fc78bd923330d0e4b23ae264bcc26f 100644 (file)
@@ -1447,6 +1447,12 @@ static int op_rename(const char *from, const char *to
        struct update_dotdot ud;
        int ret = 0;
 
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0)
+       /* renameat2 is not supported */
+       if (flags)
+               return -ENOSYS;
+#endif
+
        FUSE2FS_CHECK_CONTEXT(ff);
        fs = ff->fs;
        dbg_printf(ff, "%s: renaming %s to %s\n", __func__, from, to);