linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: Remove extent tree purging from ext4_da_page_release_reservation()
@ 2013-07-17 22:10 Jan Kara
  2013-07-19  0:44 ` Zheng Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kara @ 2013-07-17 22:10 UTC (permalink / raw)
  To: Ted Tso; +Cc: linux-ext4, Jan Kara, Zheng Liu

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@taobao.com>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 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);
-	}

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-25 23:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-17 22:10 [PATCH] ext4: Remove extent tree purging from ext4_da_page_release_reservation() Jan Kara
2013-07-19  0:44 ` Zheng Liu
2013-07-24 20:05   ` Jan Kara
2013-07-25 11:52     ` Zheng Liu
2013-07-25 14:05       ` Jan Kara
2013-07-25 23:36         ` Zheng Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).