aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/dlm/lock.c5
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.c2
-rw-r--r--include/linux/ktime.h15
-rw-r--r--net/ipv6/mip6.c2
4 files changed, 4 insertions, 20 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)
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index c98f6db9aa6b..0ca4af8cca5d 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -623,7 +623,7 @@ nfs4_ff_layoutstat_start_io(struct nfs4_ff_layout_mirror *mirror,
623 struct nfs4_flexfile_layout *ffl = FF_LAYOUT_FROM_HDR(mirror->layout); 623 struct nfs4_flexfile_layout *ffl = FF_LAYOUT_FROM_HDR(mirror->layout);
624 624
625 nfs4_ff_start_busy_timer(&layoutstat->busy_timer, now); 625 nfs4_ff_start_busy_timer(&layoutstat->busy_timer, now);
626 if (ktime_equal(mirror->start_time, 0)) 626 if (!mirror->start_time)
627 mirror->start_time = now; 627 mirror->start_time = now;
628 if (mirror->report_interval != 0) 628 if (mirror->report_interval != 0)
629 report_interval = (s64)mirror->report_interval * 1000LL; 629 report_interval = (s64)mirror->report_interval * 1000LL;
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 8e573deda55e..0c8bd45c8206 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -96,21 +96,6 @@ static inline ktime_t timeval_to_ktime(struct timeval tv)
96/* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */ 96/* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */
97#define ktime_to_ns(kt) (kt) 97#define ktime_to_ns(kt) (kt)
98 98
99
100/**
101 * ktime_equal - Compares two ktime_t variables to see if they are equal
102 * @cmp1: comparable1
103 * @cmp2: comparable2
104 *
105 * Compare two ktime_t variables.
106 *
107 * Return: 1 if equal.
108 */
109static inline int ktime_equal(const ktime_t cmp1, const ktime_t cmp2)
110{
111 return cmp1 == cmp2;
112}
113
114/** 99/**
115 * ktime_compare - Compares two ktime_t variables for less, greater or equal 100 * ktime_compare - Compares two ktime_t variables for less, greater or equal
116 * @cmp1: comparable1 101 * @cmp1: comparable1
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c
index 60c79a08e14a..64f0f7be9e5e 100644
--- a/net/ipv6/mip6.c
+++ b/net/ipv6/mip6.c
@@ -191,7 +191,7 @@ static inline int mip6_report_rl_allow(ktime_t stamp,
191 int allow = 0; 191 int allow = 0;
192 192
193 spin_lock_bh(&mip6_report_rl.lock); 193 spin_lock_bh(&mip6_report_rl.lock);
194 if (!ktime_equal(mip6_report_rl.stamp, stamp) || 194 if (mip6_report_rl.stamp != stamp ||
195 mip6_report_rl.iif != iif || 195 mip6_report_rl.iif != iif ||
196 !ipv6_addr_equal(&mip6_report_rl.src, src) || 196 !ipv6_addr_equal(&mip6_report_rl.src, src) ||
197 !ipv6_addr_equal(&mip6_report_rl.dst, dst)) { 197 !ipv6_addr_equal(&mip6_report_rl.dst, dst)) {