Stop first dirty search looping

first_dirty() forgot to stop if the tree had no dirty items at all.
It'd just spin forever.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2016-12-08 09:17:06 -08:00
parent a8a6d3697b
commit 454767e992

View File

@@ -549,6 +549,8 @@ static struct cached_item *first_dirty(struct rb_node *node)
break;
} else if (item->dirty & RIGHT_DIRTY) {
node = item->node.rb_right;
} else {
break;
}
}