Commit 1ba12553 authored by Yan Zheng's avatar Yan Zheng Committed by Chris Mason

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: default avatarYan Zheng <zheng.yan@oracle.com>
parent 180591bc
......@@ -556,10 +556,6 @@ noinline int btrfs_drop_extents(struct btrfs_trans_handle *trans,
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment