Commit 4adb8302 authored by Miklos Szeredi's avatar Miklos Szeredi

fuse: check fallocate mode

Don't allow new fallocate modes until we figure out what (if anything) that
takes.
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent 7736e8cc
......@@ -2972,6 +2972,9 @@ static long fuse_file_fallocate(struct file *file, int mode, loff_t offset,
bool lock_inode = !(mode & FALLOC_FL_KEEP_SIZE) ||
(mode & FALLOC_FL_PUNCH_HOLE);
if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
return -EOPNOTSUPP;
if (fc->no_fallocate)
return -EOPNOTSUPP;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment