Commit 494d77bf authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov
Browse files

ceph: check unsupported fallocate mode

parent 37ab77ac
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;