mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 08:18:47 +00:00
fuse: check fallocate mode
Don't allow new fallocate modes until we figure out what (if anything) that takes. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
This commit is contained in:
parent
7736e8cc51
commit
4adb83029d
@ -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) ||
|
bool lock_inode = !(mode & FALLOC_FL_KEEP_SIZE) ||
|
||||||
(mode & FALLOC_FL_PUNCH_HOLE);
|
(mode & FALLOC_FL_PUNCH_HOLE);
|
||||||
|
|
||||||
|
if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
if (fc->no_fallocate)
|
if (fc->no_fallocate)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user