From: Miao Xie Date: Thu, 26 Dec 2013 05:07:02 +0000 (+0800) Subject: Btrfs: don't run delayed nodes again after all nodes flush X-Git-Tag: v4.14-rc1~7501^2~232 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4dd466d36a50d9c96cd990e2e0d472fe720a10aa;p=platform%2Fkernel%2Flinux-rpi.git 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 --- 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);