summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2014-03-05 05:56:24 +0400
committerKent Overstreet <kmo@daterainc.com>2014-03-18 23:22:32 +0400
commit0bd143fd800055b1db756693289bbebdb93f2a73 (patch)
tree72c057a83e125fba50aec10c353cad6654958f63 /drivers/md
parent27201cfdaa2aeb571191494c1bae6863ffb04108 (diff)
downloadlinux-0bd143fd800055b1db756693289bbebdb93f2a73.tar.xz
bcache: Fix a bug recovering from unclean shutdown
The code to fixup incorrect bucket prios incorrectly did not skip btree node freeing keys Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/bcache/btree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 5f9c2a665ca5..2d4a864865eb 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -1726,9 +1726,9 @@ static int bch_btree_check_recurse(struct btree *b, struct btree_op *op,
!ptr_stale(b->c, k, i)) {
g->gen = PTR_GEN(k, i);
- if (b->level)
+ if (b->level && bkey_cmp(k, &ZERO_KEY))
g->prio = BTREE_PRIO;
- else if (g->prio == BTREE_PRIO)
+ else if (!b->level && g->prio == BTREE_PRIO)
g->prio = INITIAL_PRIO;
}
}