diff options
author | Zhao Lei <zhaolei@cn.fujitsu.com> | 2015-01-20 07:11:34 (GMT) |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-01-22 02:06:48 (GMT) |
commit | 6e9606d2a2dce098c1739fb3cd82a1c34fd73d3a (patch) | |
tree | eeeb1c991d4971cdbfda675bbbb4b37b0c6f5ebb /fs/btrfs/extent-tree.c | |
parent | 8e5cfb55d3f7dc764cd7f4c966d4c2687eaf7569 (diff) | |
download | linux-6e9606d2a2dce098c1739fb3cd82a1c34fd73d3a.tar.xz |
Btrfs: add ref_count and free function for btrfs_bio
1: ref_count is simple than current RBIO_HOLD_BBIO_MAP_BIT flag
to keep btrfs_bio's memory in raid56 recovery implement.
2: free function for bbio will make code clean and flexible, plus
forced data type checking in compile.
Changelog v1->v2:
Rename following by David Sterba's suggestion:
put_btrfs_bio() -> btrfs_put_bio()
get_btrfs_bio() -> btrfs_get_bio()
bbio->ref_count -> bbio->refs
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 3af53f8..1d361ac 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -1926,7 +1926,7 @@ int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr, */ ret = 0; } - kfree(bbio); + btrfs_put_bbio(bbio); } if (actual_bytes) |