提交 494d77bf 编写于 作者: Y Yan, Zheng 提交者: Ilya Dryomov

ceph: check unsupported fallocate mode

Signed-off-by: NYan, Zheng <zheng.z.yan@intel.com>
上级 37ab77ac
......@@ -1177,6 +1177,9 @@ static long ceph_fallocate(struct file *file, int mode,
loff_t endoff = 0;
loff_t size;
if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
return -EOPNOTSUPP;
if (!S_ISREG(inode->i_mode))
return -EOPNOTSUPP;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册