From 1ba12553f3600ffebad226c5204ab0e46df98161 Mon Sep 17 00:00:00 2001 From: Yan Zheng Date: Tue, 6 Jan 2009 09:58:02 -0500 Subject: [PATCH] Btrfs: don't change file extent's ram_bytes in btrfs_drop_extents btrfs_drop_extents doesn't change file extent's ram_bytes in the case of booked extent. To be consistent, we should also not change ram_bytes when truncating existing extent. Signed-off-by: Yan Zheng --- fs/btrfs/file.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 0e3a13a45653..90268334145e 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -556,10 +556,6 @@ next_slot: inode_sub_bytes(inode, old_num - new_num); } - if (!compression && !encryption) { - btrfs_set_file_extent_ram_bytes(leaf, - extent, new_num); - } btrfs_set_file_extent_num_bytes(leaf, extent, new_num); btrfs_mark_buffer_dirty(leaf); -- 2.30.2