Skip to content

Commit 494d77b

Browse files
Yan, Zhengidryomov
authored andcommitted
ceph: check unsupported fallocate mode
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
1 parent 37ab77a commit 494d77b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎fs/ceph/file.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,9 @@ static long ceph_fallocate(struct file *file, int mode,
11771177
loff_t endoff = 0;
11781178
loff_t size;
11791179

1180+
if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
1181+
return -EOPNOTSUPP;
1182+
11801183
if (!S_ISREG(inode->i_mode))
11811184
return -EOPNOTSUPP;
11821185

0 commit comments

Comments
 (0)