summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2015-10-22 10:56:40 -0400
committerSasha Levin <sasha.levin@oracle.com>2015-11-15 12:51:50 -0500
commit5b37f0716cdf2d63b6915331e3d3e4c87adb727c (patch)
tree0d5dac3d27c0d72250a6835c94015ed6ccac5688 /drivers
parent60be756487567007d78ec5b5f9c1e0af97f6c8bf (diff)
dm btree: fix leak of bufio-backed block in btree_split_beneath error path
[ Upstream commit 4dcb8b57df3593dcb20481d9d6cf79d1dc1534be ] btree_split_beneath()'s error path had an outstanding FIXME that speaks directly to the potential for _not_ cleaning up a previously allocated bufio-backed block. Fix this by releasing the previously allocated bufio block using unlock_block(). Reported-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Acked-by: Joe Thornber <thornber@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/persistent-data/dm-btree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/persistent-data/dm-btree.c b/drivers/md/persistent-data/dm-btree.c
index c7726cebc495..d6e47033b5e0 100644
--- a/drivers/md/persistent-data/dm-btree.c
+++ b/drivers/md/persistent-data/dm-btree.c
@@ -523,7 +523,7 @@ static int btree_split_beneath(struct shadow_spine *s, uint64_t key)
r = new_block(s->info, &right);
if (r < 0) {
- /* FIXME: put left */
+ unlock_block(s->info, left);
return r;
}