[PATCH] ext4: Remove extent tree purging from ext4_da_page_release_reservation()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ext4_da_page_release_reservation() gets called from
ext4_da_invalidatepage(). This function is used when we are truncating
page cache for punch hole or truncate operations. In either case these
operations take care of removing extents from the extent tree. This is
more efficient and the code in ext4_da_page_release_reservation() is
actually buggy anyway. So just remove it.

CC: Zheng Liu <wenqing.lz@xxxxxxxxxx>
Signed-off-by: Jan Kara <jack@xxxxxxx>
---
 fs/ext4/inode.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 0188e65..98a9972 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1388,11 +1388,6 @@ static void ext4_da_page_release_reservation(struct page *page,
 		curr_off = next_off;
 	} while ((bh = bh->b_this_page) != head);
 
-	if (to_release) {
-		lblk = page->index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
-		ext4_es_remove_extent(inode, lblk, to_release);
-	}
-
 	/* If we have released all the blocks belonging to a cluster, then we
 	 * need to release the reserved space for that cluster. */
 	num_clusters = EXT4_NUM_B2C(sbi, to_release);
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux