summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2014-06-26 09:25:17 +0200
committerIlya Dryomov <ilya.dryomov@inktank.com>2014-07-08 13:08:46 +0200
commit494d77bf8fd732f164b91710bd522ee38acb4c2e (patch)
tree22b7099e3672cd684ef499238cdba215d07aa557 /fs/ceph
parentlibceph: drop osd ref when canceling con work (diff)
downloadlinux-494d77bf8fd732f164b91710bd522ee38acb4c2e.tar.xz
linux-494d77bf8fd732f164b91710bd522ee38acb4c2e.zip
ceph: check unsupported fallocate mode
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 302085100c28..19af25dff644 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;