ceph: Convert to use jiffies macro
Use time_after_eq macro instead of using jiffies directly to handle wraparound. [ xiubli: adjust the header files order ] Signed-off-by: Chen Yufan <chenyufan@vivo.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
+2
-1
@@ -10,6 +10,7 @@
|
||||
#include <linux/writeback.h>
|
||||
#include <linux/iversion.h>
|
||||
#include <linux/filelock.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include "super.h"
|
||||
#include "mds_client.h"
|
||||
@@ -4659,7 +4660,7 @@ unsigned long ceph_check_delayed_caps(struct ceph_mds_client *mdsc)
|
||||
* slowness doesn't block mdsc delayed work,
|
||||
* preventing send_renew_caps() from running.
|
||||
*/
|
||||
if (jiffies - loop_start >= 5 * HZ)
|
||||
if (time_after_eq(jiffies, loop_start + 5 * HZ))
|
||||
break;
|
||||
}
|
||||
spin_unlock(&mdsc->cap_delay_lock);
|
||||
|
||||
Reference in New Issue
Block a user