From: Manuel Schölling Date: Wed, 21 May 2014 17:16:36 +0000 (+0200) Subject: staging: lustre: Use time_before() X-Git-Tag: next-20140530~19^2~507 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0c9f38a1d1837de9060ce06f1897235236d38545;p=karo-tx-linux.git staging: lustre: Use time_before() To be future-proof and for better readability the time comparisons are modified to use time_before() instead of plain, error-prone math. Signed-off-by: Manuel Schölling Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/include/linux/obd.h b/drivers/staging/lustre/lustre/include/linux/obd.h index fea7e6cd44c3..f96f65d5168f 100644 --- a/drivers/staging/lustre/lustre/include/linux/obd.h +++ b/drivers/staging/lustre/lustre/include/linux/obd.h @@ -80,8 +80,8 @@ static inline void __client_obd_list_lock(client_obd_lock_t *lock, break; } - if ((jiffies - cur > 5 * HZ) && - (jiffies - lock->time > 5 * HZ)) { + if (time_before(cur + 5 * HZ, jiffies) && + time_before(lock->time + 5 * HZ, jiffies)) { struct task_struct *task = lock->task; if (task == NULL)