There is some code in the wrong place - probably a hang over from a
previous arrangement before we made lafs_is_leaf a function.
No function change here.
Signed-off-by: NeilBrown <neilb@suse.de>
struct block *b = NULL;
retry:
- if (b) {
- lafs_iounlock_block(b);
- putref(b, MKREF(leaf));
- }
spin_lock(&fs->lock);
if (!list_empty(&fs->clean_leafs))
b = list_entry(fs->clean_leafs.next, struct block, lru);
*/
lafs_iolock_block(b);
- if (!lafs_is_leaf(b, phase))
+ if (!lafs_is_leaf(b, phase)) {
+ lafs_iounlock_block(b);
+ putref(b, MKREF(leaf));
goto retry;
+ }
return b;
}