1 ext4: remove unnecessary check for APPEND and IMMUTABLE
3 From: Lukas Czerner <lczerner@redhat.com>
5 All the checks IS_APPEND and IS_IMMUTABLE for the fallocate operation on
6 the inode are done in vfs. No need to do this again in ext4. Remove it.
8 Signed-off-by: Lukas Czerner <lczerner@redhat.com>
9 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
11 fs/ext4/extents.c | 6 ------
12 fs/ext4/inode.c | 6 +-----
13 2 files changed, 1 insertion(+), 11 deletions(-)
15 diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
16 index 89f2227..0177150 100644
17 --- a/fs/ext4/extents.c
18 +++ b/fs/ext4/extents.c
19 @@ -5387,12 +5387,6 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
21 mutex_lock(&inode->i_mutex);
23 - /* It's not possible punch hole on append only file */
24 - if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) {
29 if (IS_SWAPFILE(inode)) {
32 diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
33 index 1922f48..56f1ff4 100644
36 @@ -3528,11 +3528,7 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
39 mutex_lock(&inode->i_mutex);
40 - /* It's not possible punch hole on append only file */
41 - if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) {
46 if (IS_SWAPFILE(inode)) {
53 To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
54 the body of a message to majordomo@vger.kernel.org
55 More majordomo info at http://vger.kernel.org/majordomo-info.html