summaryrefslogtreecommitdiff
path: root/disk-io.h
diff options
context:
space:
mode:
authorZach Brown <zab@zabbo.net>2014-08-27 11:16:03 -0700
committerDavid Sterba <dsterba@suse.cz>2014-09-14 13:19:44 +0200
commit977f2baf363b59d4263d870b292975e2b791cd07 (patch)
tree1af5eeb97359b8a0bd6a8d8238ae5e038fba3c19 /disk-io.h
parentcf8599c33803932b73e00a54785103030a37a4ee (diff)
btrfs-progs: kill BUG_ON in readahead_tree_block()
David sent a quick patch that removed a BUG_ON(). I took a peek and found that the function was already leaking an eb ref and only returned 0. So this fixes the leak and makes the function void and fixes up the callers. Accidentally-motivated-by: David Sterba <dsterba@suse.cz> Signed-off-by: Zach Brown <zab@zabbo.net> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'disk-io.h')
-rw-r--r--disk-io.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/disk-io.h b/disk-io.h
index 13d4420a..c2960558 100644
--- a/disk-io.h
+++ b/disk-io.h
@@ -48,8 +48,8 @@ struct btrfs_device;
int read_whole_eb(struct btrfs_fs_info *info, struct extent_buffer *eb, int mirror);
struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,
u32 blocksize, u64 parent_transid);
-int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize,
- u64 parent_transid);
+void readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize,
+ u64 parent_transid);
struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root,
u64 bytenr, u32 blocksize);