Skip to content

Commit 2015716

Browse files
Chen Yufanidryomov
authored andcommitted
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 <[email protected]> Reviewed-by: Xiubo Li <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 9a948c0 commit 2015716

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/ceph/caps.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/writeback.h>
1111
#include <linux/iversion.h>
1212
#include <linux/filelock.h>
13+
#include <linux/jiffies.h>
1314

1415
#include "super.h"
1516
#include "mds_client.h"
@@ -4659,7 +4660,7 @@ unsigned long ceph_check_delayed_caps(struct ceph_mds_client *mdsc)
46594660
* slowness doesn't block mdsc delayed work,
46604661
* preventing send_renew_caps() from running.
46614662
*/
4662-
if (jiffies - loop_start >= 5 * HZ)
4663+
if (time_after_eq(jiffies, loop_start + 5 * HZ))
46634664
break;
46644665
}
46654666
spin_unlock(&mdsc->cap_delay_lock);

0 commit comments

Comments
 (0)