From 4dd466d36a50d9c96cd990e2e0d472fe720a10aa Mon Sep 17 00:00:00 2001 From: Miao Xie Date: Thu, 26 Dec 2013 13:07:02 +0800 Subject: [PATCH] Btrfs: don't run delayed nodes again after all nodes flush If the number of the delayed items is greater than the upper limit, we will try to flush all the delayed items. After that, it is unnecessary to run them again because they are being dealt with by the wokers or the number of them is less than the lower limit. Signed-off-by: Miao Xie Signed-off-by: Chris Mason --- fs/btrfs/delayed-inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 608efeb24aea..10d149c1fde1 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -1395,6 +1395,7 @@ void btrfs_balance_delayed_items(struct btrfs_root *root) break; } finish_wait(&delayed_root->wait, &__wait); + return; } btrfs_wq_run_delayed_node(delayed_root, root, BTRFS_DELAYED_BATCH); -- 2.20.1