1
0
Fork 0

btrfs: cleanup: use already calculated value in btrfs_should_throttle_delayed_refs()

Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
zero-colors
Wang Xiaoguang 2016-10-26 15:23:01 +08:00 committed by David Sterba
parent cf8cddd38b
commit dc1a90c6aa
1 changed files with 1 additions and 1 deletions

View File

@ -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;