]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Btrfs: don't change file extent's ram_bytes in btrfs_drop_extents
authorYan Zheng <zheng.yan@oracle.com>
Tue, 6 Jan 2009 14:58:02 +0000 (09:58 -0500)
committerChris Mason <chris.mason@oracle.com>
Tue, 6 Jan 2009 14:58:02 +0000 (09:58 -0500)
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>
fs/btrfs/file.c

index 0e3a13a4565355b2ca975ed5b68a6c0f48ae3fc1..90268334145e30e4abe0390333b98678bf47db29 100644 (file)
@@ -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);