diff options
author | Chris Mason <clm@fb.com> | 2014-01-04 06:07:00 +0100 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-29 16:06:29 +0100 |
commit | 514ac8ad8793a097c0c9d89202c642479d6dfa34 (patch) | |
tree | 7b94b18dce144eb4be4e45102c00071c02c6e2b3 /fs/btrfs/print-tree.c | |
parent | Btrfs: fix btrfs_search_slot_for_read backwards iteration (diff) | |
download | linux-514ac8ad8793a097c0c9d89202c642479d6dfa34.tar.xz linux-514ac8ad8793a097c0c9d89202c642479d6dfa34.zip |
Btrfs: don't use ram_bytes for uncompressed inline items
If we truncate an uncompressed inline item, ram_bytes isn't updated to reflect
the new size. The fixe uses the size directly from the item header when
reading uncompressed inlines, and also fixes truncate to update the
size as it goes.
Reported-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
CC: stable@vger.kernel.org
Diffstat (limited to 'fs/btrfs/print-tree.c')
-rw-r--r-- | fs/btrfs/print-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index 4eed002b7cf6..6efd70d3b64f 100644 --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c @@ -249,7 +249,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) BTRFS_FILE_EXTENT_INLINE) { printk(KERN_INFO "\t\tinline extent data " "size %u\n", - btrfs_file_extent_inline_len(l, fi)); + btrfs_file_extent_inline_len(l, i, fi)); break; } printk(KERN_INFO "\t\textent data disk bytenr %llu " |