]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix all callers of read_tree_block
authorJosef Bacik <jbacik@fusionio.com>
Tue, 23 Apr 2013 18:17:42 +0000 (14:17 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:55:07 +0000 (15:55 -0400)
commit03fb2bf73925f134ad3c64edc6da7ac057e8ac5f
tree28a781ba1559a3021cb2aea8bbeebcfb20653115
parentd7e4508ad49f9358887ab1ca59e93ff81d45d4e8
Btrfs: fix all callers of read_tree_block

We kept leaking extent buffers when mounting a broken file system and it turns
out it's because not everybody uses read_tree_block properly.  You need to check
and make sure the extent_buffer is uptodate before you use it.  This patch fixes
everybody who calls read_tree_block directly to make sure they check that it is
uptodate and free it and return an error if it is not.  With this we no longer
leak EB's when things go horribly wrong.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/backref.c
fs/btrfs/ctree.c
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/relocation.c