aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-12-25 06:43:07 -0500
committerThomas Gleixner <tglx@linutronix.de>2016-12-25 11:21:23 -0500
commit1f3a8e49d8f28f498b8694464623ac20aebfe62a (patch)
treeda0b5101c3be3e18b55b0a11974f63a3195704f9 /fs/dlm
parent8b0e195314fabd58a331c4f7b6db75a1565535d7 (diff)
ktime: Get rid of ktime_equal()
No point in going through loops and hoops instead of just comparing the values. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index f631a70407f6..6df332296c66 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -1395,7 +1395,6 @@ static int nodeid_warned(int nodeid, int num_nodes, int *warned)
1395void dlm_scan_waiters(struct dlm_ls *ls) 1395void dlm_scan_waiters(struct dlm_ls *ls)
1396{ 1396{
1397 struct dlm_lkb *lkb; 1397 struct dlm_lkb *lkb;
1398 ktime_t zero = 0;
1399 s64 us; 1398 s64 us;
1400 s64 debug_maxus = 0; 1399 s64 debug_maxus = 0;
1401 u32 debug_scanned = 0; 1400 u32 debug_scanned = 0;
@@ -1409,7 +1408,7 @@ void dlm_scan_waiters(struct dlm_ls *ls)
1409 mutex_lock(&ls->ls_waiters_mutex); 1408 mutex_lock(&ls->ls_waiters_mutex);
1410 1409
1411 list_for_each_entry(lkb, &ls->ls_waiters, lkb_wait_reply) { 1410 list_for_each_entry(lkb, &ls->ls_waiters, lkb_wait_reply) {
1412 if (ktime_equal(lkb->lkb_wait_time, zero)) 1411 if (!lkb->lkb_wait_time)
1413 continue; 1412 continue;
1414 1413
1415 debug_scanned++; 1414 debug_scanned++;
@@ -1419,7 +1418,7 @@ void dlm_scan_waiters(struct dlm_ls *ls)
1419 if (us < dlm_config.ci_waitwarn_us) 1418 if (us < dlm_config.ci_waitwarn_us)
1420 continue; 1419 continue;
1421 1420
1422 lkb->lkb_wait_time = zero; 1421 lkb->lkb_wait_time = 0;
1423 1422
1424 debug_expired++; 1423 debug_expired++;
1425 if (us > debug_maxus) 1424 if (us > debug_maxus)