Blob Blame History Raw
From: Jeff Mahoney <jeffm@suse.com>
Subject: btrfs: add cond_resched to btrfs_qgroup_trace_leaf_items
References: bsc#1028286 bsc#1017461 bsc#1036171
Patch-mainline: v4.13-rc1
Git-commit: cddf3b2cb33e01087e82580a4a7d508f08ba59e4

On an uncontended system, we can end up hitting soft lockups while
doing replace_path.  At the core, and frequently called is
btrfs_qgroup_trace_leaf_items, so it makes sense to add a cond_resched
there.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 fs/btrfs/qgroup.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1548,6 +1548,7 @@ int btrfs_qgroup_trace_leaf_items(struct
 		if (ret)
 			return ret;
 	}
+	cond_resched();
 	return 0;
 }