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

Commit 18fd5baa authored by Peng Tao's avatar Peng Tao Committed by Greg Kroah-Hartman
Browse files

staging/lustre/libcfs: remove schedule_timeout_and_set_state



Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarPeng Tao <bergwolf@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b7efb98d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ void cfs_pause(cfs_duration_t ticks);
 * Timer
 */
typedef  void (cfs_timer_func_t)(ulong_ptr_t);
void schedule_timeout_and_set_state(long, int64_t);

void add_wait_queue_exclusive_head(wait_queue_head_t *, wait_queue_t *);

+2 −2
Original line number Diff line number Diff line
@@ -1209,8 +1209,8 @@ rescan:
		/* Call cfs_pause() here always adds 1 to load average
		 * because kernel counts # active tasks as nr_running
		 * + nr_uninterruptible. */
		schedule_timeout_and_set_state(TASK_INTERRUPTIBLE,
						   cfs_time_seconds(1));
		set_current_state(TASK_INTERRUPTIBLE);
		schedule_timeout(cfs_time_seconds(1));
	}

	LASSERT(the_lnet.ln_rc_state == LNET_RC_STATE_STOPPING);
+2 −2
Original line number Diff line number Diff line
@@ -192,8 +192,8 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req,
	if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_CANCEL_BL_CB_RACE)) {
		int to = cfs_time_seconds(1);
		while (to > 0) {
			schedule_timeout_and_set_state(
				TASK_INTERRUPTIBLE, to);
			set_current_state(TASK_INTERRUPTIBLE);
			schedule_timeout(to);
			if (lock->l_granted_mode == lock->l_req_mode ||
			    lock->l_flags & LDLM_FL_DESTROYED)
				break;
+2 −2
Original line number Diff line number Diff line
@@ -127,8 +127,8 @@ int __cfs_fail_timeout_set(__u32 id, __u32 value, int ms, int set)
	if (ret) {
		CERROR("cfs_fail_timeout id %x sleeping for %dms\n",
		       id, ms);
		schedule_timeout_and_set_state(TASK_UNINTERRUPTIBLE,
						   cfs_time_seconds(ms) / 1000);
		set_current_state(TASK_UNINTERRUPTIBLE);
		schedule_timeout(cfs_time_seconds(ms) / 1000);
		set_current_state(TASK_RUNNING);
		CERROR("cfs_fail_timeout id %x awake\n", id);
	}
+0 −8
Original line number Diff line number Diff line
@@ -70,14 +70,6 @@ add_wait_queue_exclusive_head(wait_queue_head_t *waitq, wait_queue_t *link)
}
EXPORT_SYMBOL(add_wait_queue_exclusive_head);

void
schedule_timeout_and_set_state(long state, int64_t timeout)
{
	set_current_state(state);
	schedule_timeout(timeout);
}
EXPORT_SYMBOL(schedule_timeout_and_set_state);

/* deschedule for a bit... */
void
cfs_pause(cfs_duration_t ticks)
Loading