Btrfs: don't use ram_bytes for uncompressed inline items
authorChris Mason <clm@fb.com>
Sat, 4 Jan 2014 05:07:00 +0000 (21:07 -0800)
committerChris Mason <clm@fb.com>
Wed, 29 Jan 2014 15:06:29 +0000 (07:06 -0800)
commit514ac8ad8793a097c0c9d89202c642479d6dfa34
tree7b94b18dce144eb4be4e45102c00071c02c6e2b3
parent23c6bf6a91e96c17a452e07b12b38ed66504e799
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
fs/btrfs/ctree.h
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/print-tree.c
fs/btrfs/send.c
fs/btrfs/tree-log.c