From: Yan, Zheng Date: Thu, 26 Jun 2014 07:25:17 +0000 (+0800) Subject: ceph: check unsupported fallocate mode X-Git-Tag: v4.14-rc1~7028^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=494d77bf8fd732f164b91710bd522ee38acb4c2e;p=platform%2Fkernel%2Flinux-rpi.git ceph: check unsupported fallocate mode Signed-off-by: Yan, Zheng --- diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 3020851..19af25d 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -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;