OSDN Git Service

fuse: Support RENAME_WHITEOUT flag
authorVivek Goyal <vgoyal@redhat.com>
Wed, 5 Feb 2020 13:15:46 +0000 (08:15 -0500)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 6 Feb 2020 15:39:28 +0000 (16:39 +0100)
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>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dir.c

index ee19011..de1e2fd 100644 (file)
@@ -818,7 +818,7 @@ static int fuse_rename2(struct inode *olddir, struct dentry *oldent,
        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) {