浏览代码

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 <zheng.yan@oracle.com>
Yan Zheng 16 年之前
父节点
当前提交
1ba12553f3
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0 4
      fs/btrfs/file.c

+ 0 - 4
fs/btrfs/file.c

@@ -556,10 +556,6 @@ next_slot:
 					inode_sub_bytes(inode, old_num -
 					inode_sub_bytes(inode, old_num -
 							new_num);
 							new_num);
 				}
 				}
-				if (!compression && !encryption) {
-					btrfs_set_file_extent_ram_bytes(leaf,
-							extent, new_num);
-				}
 				btrfs_set_file_extent_num_bytes(leaf,
 				btrfs_set_file_extent_num_bytes(leaf,
 							extent, new_num);
 							extent, new_num);
 				btrfs_mark_buffer_dirty(leaf);
 				btrfs_mark_buffer_dirty(leaf);