From 551b7f7850c14a7e06de70a87f44dfccc044d9e3 Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Mon, 18 Jul 2016 12:45:17 -0700 Subject: fs: ext4: disable support for fallocate FALLOC_FL_PUNCH_HOLE Bug: 28760453 Change-Id: I019c2de559db9e4b95860ab852211b456d78c4ca Signed-off-by: Nick Desaulniers --- fs/ext4/inode.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index f16a955..a57ecbb 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4515,6 +4515,7 @@ int ext4_can_truncate(struct inode *inode) int ext4_punch_hole(struct file *file, loff_t offset, loff_t length) { +#if 0 struct inode *inode = file->f_path.dentry->d_inode; if (!S_ISREG(inode->i_mode)) return -ENOTSUPP; @@ -4525,6 +4526,12 @@ int ext4_punch_hole(struct file *file, loff_t offset, loff_t length) } return ext4_ext_punch_hole(file, offset, length); +#else + /* + * Disabled as per b/28760453 + */ + return -EOPNOTSUPP; +#endif } /* -- cgit v1.1