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 <manuel.schoelling@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Manuel Schölling 2014-05-21 19:16:36 +02:00 committed by Greg Kroah-Hartman
parent fe456ff4bc
commit 0c9f38a1d1
1 changed files with 2 additions and 2 deletions

View File

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