diff mbox series

fuse: Support RENAME_WHITEOUT flag

Message ID 20200205131546.GA14544@redhat.com (mailing list archive)
State New, archived
Headers show
Series fuse: Support RENAME_WHITEOUT flag | expand

Commit Message

Vivek Goyal Feb. 5, 2020, 1:15 p.m. UTC
Allow fuse to pass RENAME_WHITEOUT to fuse server. Overlayfs on top of
virtiofs uses RENAME_WHITEOUT.

Without this patch renaming a directory in overlayfs (dir is on lower) fails
with -EINVAL. With this patch it works.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
 fs/fuse/dir.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Miklos Szeredi Feb. 6, 2020, 12:12 p.m. UTC | #1
On Wed, Feb 5, 2020 at 2:15 PM Vivek Goyal <vgoyal@redhat.com> wrote:
>
> Allow fuse to pass RENAME_WHITEOUT to fuse server. Overlayfs on top of
> virtiofs uses RENAME_WHITEOUT.
>
> Without this patch renaming a directory in overlayfs (dir is on lower) fails
> with -EINVAL. With this patch it works.
>
> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>

Thanks, applied.

Miklos
diff mbox series

Patch

Index: rhvgoyal-linux-fuse/fs/fuse/dir.c
===================================================================
--- rhvgoyal-linux-fuse.orig/fs/fuse/dir.c	2020-01-02 12:52:13.706585709 -0500
+++ rhvgoyal-linux-fuse/fs/fuse/dir.c	2020-02-05 08:03:32.953158410 -0500
@@ -818,7 +818,7 @@  static int fuse_rename2(struct inode *ol
 	struct fuse_conn *fc = get_fuse_conn(olddir);
 	int err;
 
-	if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE))
+	if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT))
 		return -EINVAL;
 
 	if (flags) {