From: Wang Xiaoguang Date: Wed, 26 Oct 2016 07:23:01 +0000 (+0800) Subject: btrfs: cleanup: use already calculated value in btrfs_should_throttle_delayed_refs() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dc1a90c6aad8f0a4bd6e5e02c5244c6a760cd776;p=linux-beck.git btrfs: cleanup: use already calculated value in btrfs_should_throttle_delayed_refs() Signed-off-by: Wang Xiaoguang Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 87ad2ebcac62..62b6e2023e12 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2826,7 +2826,7 @@ int btrfs_should_throttle_delayed_refs(struct btrfs_trans_handle *trans, smp_mb(); avg_runtime = fs_info->avg_delayed_ref_runtime; val = num_entries * avg_runtime; - if (num_entries * avg_runtime >= NSEC_PER_SEC) + if (val >= NSEC_PER_SEC) return 1; if (val >= NSEC_PER_SEC / 2) return 2;