From: Darrick J. Wong Date: Wed, 21 May 2025 22:40:39 +0000 (-0700) Subject: fuse2fs: fix fallocate zero range X-Git-Tag: v1.47.3-rc1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f09e999be64bd0df0e4d779ea90c878745cf557f;p=thirdparty%2Fe2fsprogs.git fuse2fs: fix fallocate zero range Allow this flag when we're checking flags in op_fallocate. Signed-off-by: Darrick J. Wong Link: https://lore.kernel.org/r/174786677941.1383760.17359353030156900900.stgit@frogsfrogsfrogs Signed-off-by: Theodore Ts'o --- diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c index 800122fc..0d65d63b 100644 --- a/misc/fuse2fs.c +++ b/misc/fuse2fs.c @@ -3853,7 +3853,7 @@ static int op_fallocate(const char *path EXT2FS_ATTR((unused)), int mode, int ret; /* Catch unknown flags */ - if (mode & ~(FL_PUNCH_HOLE_FLAG | FL_KEEP_SIZE_FLAG)) + if (mode & ~(FL_ZERO_RANGE_FLAG | FL_PUNCH_HOLE_FLAG | FL_KEEP_SIZE_FLAG)) return -EOPNOTSUPP; pthread_mutex_lock(&ff->bfl);