aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
authorAshish Sangwan <ashishsangwan2@gmail.com>2012-08-18 22:29:46 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-08-18 22:29:46 -0400
commite3d2e433e32a4b7a05818cbc9158037e26c74c8e (patch)
tree4f8074e7c1ea6762fbe9474499619f1bad53f261 /fs/ext4/extents.c
parenteeecef0af5ea4efd763c9554cf2bd80fc4a0efd3 (diff)
ext4: no need to add inode to orphan list during hole punch
While performing punch hole for an inode, i_disksize is not changed. So, there is no need to add the inode to orphan list. Signed-off-by: Ashish Sangwan <ashish.sangwan2@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Zheng Liu <wenqing.lz@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 2f082abf4992..2e56903e8d53 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4860,9 +4860,6 @@ int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length)
4860 if (IS_ERR(handle)) 4860 if (IS_ERR(handle))
4861 return PTR_ERR(handle); 4861 return PTR_ERR(handle);
4862 4862
4863 err = ext4_orphan_add(handle, inode);
4864 if (err)
4865 goto out;
4866 4863
4867 /* 4864 /*
4868 * Now we need to zero out the non-page-aligned data in the 4865 * Now we need to zero out the non-page-aligned data in the
@@ -4948,7 +4945,6 @@ int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length)
4948 up_write(&EXT4_I(inode)->i_data_sem); 4945 up_write(&EXT4_I(inode)->i_data_sem);
4949 4946
4950out: 4947out:
4951 ext4_orphan_del(handle, inode);
4952 inode->i_mtime = inode->i_ctime = ext4_current_time(inode); 4948 inode->i_mtime = inode->i_ctime = ext4_current_time(inode);
4953 ext4_mark_inode_dirty(handle, inode); 4949 ext4_mark_inode_dirty(handle, inode);
4954 ext4_journal_stop(handle); 4950 ext4_journal_stop(handle);