提交 4adb8302 编写于 作者: M Miklos Szeredi

fuse: check fallocate mode

Don't allow new fallocate modes until we figure out what (if anything) that
takes.
Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
上级 7736e8cc
...@@ -2972,6 +2972,9 @@ static long fuse_file_fallocate(struct file *file, int mode, loff_t offset, ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册