mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
|
From f0ac071fc6660c1d8d4b0d0dbe7642dd1274e4a5 Mon Sep 17 00:00:00 2001
|
||
|
From: Nick Desaulniers <ndesaulniers@google.com>
|
||
|
Date: Mon, 18 Jul 2016 12:45:17 -0700
|
||
|
Subject: [PATCH] fs: ext4: disable support for fallocate FALLOC_FL_PUNCH_HOLE
|
||
|
|
||
|
Bug: 28760453
|
||
|
Change-Id: I019c2de559db9e4b95860ab852211b456d78c4ca
|
||
|
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
|
||
|
---
|
||
|
fs/ext4/inode.c | 7 +++++++
|
||
|
1 file changed, 7 insertions(+)
|
||
|
|
||
|
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
|
||
|
index 589d6d3134e01..bf37388aa01b7 100644
|
||
|
--- a/fs/ext4/inode.c
|
||
|
+++ b/fs/ext4/inode.c
|
||
|
@@ -3503,6 +3503,7 @@ int ext4_can_truncate(struct inode *inode)
|
||
|
|
||
|
int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
|
||
|
{
|
||
|
+#if 0
|
||
|
struct super_block *sb = inode->i_sb;
|
||
|
ext4_lblk_t first_block, stop_block;
|
||
|
struct address_space *mapping = inode->i_mapping;
|
||
|
@@ -3626,6 +3627,12 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
|
||
|
out_mutex:
|
||
|
mutex_unlock(&inode->i_mutex);
|
||
|
return ret;
|
||
|
+#else
|
||
|
+ /*
|
||
|
+ * Disabled as per b/28760453
|
||
|
+ */
|
||
|
+ return -EOPNOTSUPP;
|
||
|
+#endif
|
||
|
}
|
||
|
|
||
|
int ext4_inode_attach_jinode(struct inode *inode)
|