aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/scrub.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2020-10-08 15:24:28 +0300
committerDavid Sterba <dsterba@suse.com>2020-12-08 15:53:19 +0100
commite4e428816192798c2fa473ff67d9032b94f93291 (patch)
tree34e1545005c8f4c23a8eba409880715b80c7d1aa /fs/btrfs/scrub.c
parentbtrfs: use helpers to convert from seconds to jiffies in transaction_kthread (diff)
downloadlinux-dev-e4e428816192798c2fa473ff67d9032b94f93291.tar.xz
linux-dev-e4e428816192798c2fa473ff67d9032b94f93291.zip
btrfs: remove redundant time check in transaction kthread loop
The value obtained from ktime_get_seconds() is guaranteed to be monotonically increasing since it's taken from CLOCK_MONOTONIC. As transaction_kthread obtains a reference to the currently running transaction under holding btrfs_fs_info::trans_lock it's guaranteed to: a) see an initialized 'cur', whose start_time is guaranteed to be smaller than 'now' or b) not obtain a 'cur' and simply go to sleep. Given this remove the unnecessary check, if it sees now < cur->start_time this would imply there are far greater problems on the machine. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
0 files changed, 0 insertions, 0 deletions