Skip to content

Commit

Permalink
Btrfs: stop leaking btrfs_bios on readahead
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Ilya Dryomov authored and Chris Mason committed Nov 6, 2011
1 parent 306c8b6 commit 9510dc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/btrfs/reada.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
}
spin_unlock(&fs_info->reada_lock);

kfree(multi);
return re;

error:
Expand All @@ -447,6 +448,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
kref_put(&zone->refcnt, reada_zone_release);
spin_unlock(&fs_info->reada_lock);
}
kfree(multi);
kfree(re);
if (looped)
goto again;
Expand Down

0 comments on commit 9510dc4

Please sign in to comment.