commit | 494d77bf8fd732f164b91710bd522ee38acb4c2e | [log] [tgz] |
---|---|---|
author | Yan, Zheng <zheng.z.yan@intel.com> | Thu Jun 26 15:25:17 2014 +0800 |
committer | Ilya Dryomov <ilya.dryomov@inktank.com> | Tue Jul 08 15:08:46 2014 +0400 |
tree | 22b7099e3672cd684ef499238cdba215d07aa557 | |
parent | 37ab77ac29b5bdec029a66f6d6eb4756679c7e12 [diff] [blame] |
ceph: check unsupported fallocate mode Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
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 @@ 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;