[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174553065177.1160461.684615549721279410.stgit@frogsfrogsfrogs>
Date: Thu, 24 Apr 2025 14:44:25 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: tytso@....edu
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH 14/16] fuse2fs: disable renameat2
From: Darrick J. Wong <djwong@...nel.org>
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@...nel.org>
---
misc/fuse2fs.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 7db0a2d1f2d855..420fbfd5db5969 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -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);
Powered by blists - more mailing lists