Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 699503bc authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

staging: lustre: remove cfs_time_before()



Just call time_before() instead.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: hpdd-discuss <hpdd-discuss@lists.01.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 88c03eae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ static inline unsigned long cfs_time_sub(unsigned long t1, unsigned long t2)

static inline int cfs_time_after(unsigned long t1, unsigned long t2)
{
	return cfs_time_before(t2, t1);
	return time_before(t2, t1);
}

static inline int cfs_time_aftereq(unsigned long t1, unsigned long t2)
+0 −30
Original line number Diff line number Diff line
@@ -45,31 +45,6 @@
#error Do not #include this file directly. #include <linux/libcfs/libcfs.h> instead
#endif

/* Portable time API */

/*
 * Platform provides three opaque data-types:
 *
 *  unsigned long     cfs_time_current(void);
 *  unsigned long     cfs_time_add    (unsigned long, long);
 *  long cfs_time_sub    (unsigned long, unsigned long);
 *  int	    cfs_impl_time_before (unsigned long, unsigned long);
 *  int	    cfs_impl_time_before_eq(unsigned long, unsigned long);
 *
 *  long cfs_duration_build(int64_t);
 *
 *  time_t	 cfs_duration_sec (long);
 *  void	   cfs_duration_usec(long, struct timeval *);
 *
 *  void	   cfs_fs_time_current(struct timespec *);
 *  time_t	 cfs_fs_time_sec    (struct timespec *);
 *  void	   cfs_fs_time_usec   (struct timespec *, struct timeval *);
 *
 *  CFS_TIME_FORMAT
 *  CFS_DURATION_FORMAT
 *
 */

#define ONE_BILLION ((u_int64_t)1000000000)
#define ONE_MILLION 1000000

@@ -97,11 +72,6 @@ static inline void cfs_fs_time_usec(struct timespec *t, struct timeval *v)
 * Generic kernel stuff
 */

static inline int cfs_time_before(unsigned long t1, unsigned long t2)
{
	return time_before(t1, t2);
}

static inline unsigned long cfs_time_current(void)
{
	return jiffies;
+2 −2
Original line number Diff line number Diff line
@@ -1606,7 +1606,7 @@ kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, __u64 *pages, int npages,

	}

	if (cfs_time_before(cfs_time_current(), fps->fps_next_retry)) {
	if (time_before(cfs_time_current(), fps->fps_next_retry)) {
		/* someone failed recently */
		spin_unlock(&fps->fps_lock);
		return -EAGAIN;
@@ -1808,7 +1808,7 @@ kiblnd_pool_alloc_node(kib_poolset_t *ps)
		goto again;
	}

	if (cfs_time_before(cfs_time_current(), ps->ps_next_retry)) {
	if (time_before(cfs_time_current(), ps->ps_next_retry)) {
		/* someone failed recently */
		spin_unlock(&ps->ps_lock);
		return NULL;
+2 −2
Original line number Diff line number Diff line
@@ -3465,7 +3465,7 @@ kiblnd_failover_thread(void *arg)

		list_for_each_entry(dev, &kiblnd_data.kib_failed_devs,
				    ibd_fail_list) {
			if (cfs_time_before(cfs_time_current(),
			if (time_before(cfs_time_current(),
					dev->ibd_next_failover))
				continue;
			do_failover = 1;
+4 −5
Original line number Diff line number Diff line
@@ -2368,13 +2368,12 @@ ksocknal_send_keepalive_locked(ksock_peer_t *peer)
		return 0;

	if (*ksocknal_tunables.ksnd_keepalive <= 0 ||
	    cfs_time_before(cfs_time_current(),
	    time_before(cfs_time_current(),
			cfs_time_add(peer->ksnp_last_alive,
				     cfs_time_seconds(*ksocknal_tunables.ksnd_keepalive))))
		return 0;

	if (cfs_time_before(cfs_time_current(),
			    peer->ksnp_send_keepalive))
	if (time_before(cfs_time_current(), peer->ksnp_send_keepalive))
		return 0;

	/* retry 10 secs later, so we wouldn't put pressure
Loading