Skip to content

Commit 27a377d

Browse files
Josef Bacikmasoncl
authored andcommitted
Btrfs: don't loop forever if we can't run because of the tree mod log
A user reported a 100% cpu hang with my new delayed ref code. Turns out I forgot to increase the count check when we can't run a delayed ref because of the tree mod log. If we can't run any delayed refs during this there is no point in continuing to look, and we need to break out. Thanks, Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Chris Mason <[email protected]>
1 parent 8051aa1 commit 27a377d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/btrfs/extent-tree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,6 +2385,7 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
23852385
spin_unlock(&delayed_refs->lock);
23862386
locked_ref = NULL;
23872387
cond_resched();
2388+
count++;
23882389
continue;
23892390
}
23902391

0 commit comments

Comments
 (0)