From: Vivek Goyal Date: Wed, 5 Feb 2020 13:15:46 +0000 (-0500) Subject: fuse: Support RENAME_WHITEOUT flag X-Git-Tag: v5.6-rc1~25^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=519525fa47b5a8155f0b203e49a3a6a2319f75ae;p=thirdparty%2Fkernel%2Flinux.git fuse: Support RENAME_WHITEOUT flag 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 Signed-off-by: Miklos Szeredi --- diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index ee190119f45cc..de1e2fde60bd4 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -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) {