From: Josef Bacik Date: Fri, 7 Feb 2014 18:57:59 +0000 (-0500) Subject: Btrfs: don't loop forever if we can't run because of the tree mod log X-Git-Tag: v3.14-rc2~3^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=27a377db745ed4d11b3b9b340756857cb8dde07f;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 9c9ecc9..32312e0 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2385,6 +2385,7 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, spin_unlock(&delayed_refs->lock); locked_ref = NULL; cond_resched(); + count++; continue; }