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

Commit 75659ca0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc: (22 commits)
  Remove commented-out code copied from NFS
  NFS: Switch from intr mount option to TASK_KILLABLE
  Add wait_for_completion_killable
  Add wait_event_killable
  Add schedule_timeout_killable
  Use mutex_lock_killable in vfs_readdir
  Add mutex_lock_killable
  Use lock_page_killable
  Add lock_page_killable
  Add fatal_signal_pending
  Add TASK_WAKEKILL
  exit: Use task_is_*
  signal: Use task_is_*
  sched: Use task_contributes_to_load, TASK_ALL and TASK_NORMAL
  ptrace: Use task_is_*
  power: Use task_is_*
  wait: Use TASK_NORMAL
  proc/base.c: Use task_is_*
  proc/array.c: Use TASK_REPORT
  perfmon: Use task_is_*
  ...

Fixed up conflicts in NFS/sunrpc manually..
parents fbdde7bd 2dfe485a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2631,7 +2631,7 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task)
	 */
	if (task == current) return 0;

	if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) {
	if (!task_is_stopped_or_traced(task)) {
		DPRINT(("cannot attach to non-stopped task [%d] state=%ld\n", task_pid_nr(task), task->state));
		return -EBUSY;
	}
@@ -4792,7 +4792,7 @@ recheck:
	 * the task must be stopped.
	 */
	if (PFM_CMD_STOPPED(cmd)) {
		if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) {
		if (!task_is_stopped_or_traced(task)) {
			DPRINT(("[%d] task not in stopped state\n", task_pid_nr(task)));
			return -EBUSY;
		}
+4 −7
Original line number Diff line number Diff line
@@ -656,8 +656,7 @@ is_linked:
	 * wait list.
	 */
	if (waitqueue_active(&ep->wq))
		__wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE |
				 TASK_INTERRUPTIBLE);
		wake_up_locked(&ep->wq);
	if (waitqueue_active(&ep->poll_wait))
		pwake++;

@@ -780,7 +779,7 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event,

		/* Notify waiting tasks that events are available */
		if (waitqueue_active(&ep->wq))
			__wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE);
			wake_up_locked(&ep->wq);
		if (waitqueue_active(&ep->poll_wait))
			pwake++;
	}
@@ -854,8 +853,7 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi, struct epoll_even

			/* Notify waiting tasks that events are available */
			if (waitqueue_active(&ep->wq))
				__wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE |
						 TASK_INTERRUPTIBLE);
				wake_up_locked(&ep->wq);
			if (waitqueue_active(&ep->poll_wait))
				pwake++;
		}
@@ -978,8 +976,7 @@ errxit:
		 * wait list (delayed after we release the lock).
		 */
		if (waitqueue_active(&ep->wq))
			__wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE |
					 TASK_INTERRUPTIBLE);
			wake_up_locked(&ep->wq);
		if (waitqueue_active(&ep->poll_wait))
			pwake++;
	}
+1 −5
Original line number Diff line number Diff line
@@ -386,7 +386,7 @@ found_client:
	if (new)
		nfs_free_client(new);

	error = wait_event_interruptible(nfs_client_active_wq,
	error = wait_event_killable(nfs_client_active_wq,
				clp->cl_cons_state != NFS_CS_INITING);
	if (error < 0) {
		nfs_put_client(clp);
@@ -589,10 +589,6 @@ static int nfs_init_server_rpcclient(struct nfs_server *server,
	if (server->flags & NFS_MOUNT_SOFT)
		server->client->cl_softrtry = 1;

	server->client->cl_intr = 0;
	if (server->flags & NFS4_MOUNT_INTR)
		server->client->cl_intr = 1;

	return 0;
}

+1 −6
Original line number Diff line number Diff line
@@ -188,17 +188,12 @@ static void nfs_direct_req_release(struct nfs_direct_req *dreq)
static ssize_t nfs_direct_wait(struct nfs_direct_req *dreq)
{
	ssize_t result = -EIOCBQUEUED;
	struct rpc_clnt *clnt;
	sigset_t oldset;

	/* Async requests don't wait here */
	if (dreq->iocb)
		goto out;

	clnt = NFS_CLIENT(dreq->inode);
	rpc_clnt_sigmask(clnt, &oldset);
	result = wait_for_completion_interruptible(&dreq->completion);
	rpc_clnt_sigunmask(clnt, &oldset);
	result = wait_for_completion_killable(&dreq->completion);

	if (!result)
		result = dreq->error;
+1 −5
Original line number Diff line number Diff line
@@ -433,15 +433,11 @@ static int nfs_wait_schedule(void *word)
 */
static int nfs_wait_on_inode(struct inode *inode)
{
	struct rpc_clnt	*clnt = NFS_CLIENT(inode);
	struct nfs_inode *nfsi = NFS_I(inode);
	sigset_t oldmask;
	int error;

	rpc_clnt_sigmask(clnt, &oldmask);
	error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING,
					nfs_wait_schedule, TASK_INTERRUPTIBLE);
	rpc_clnt_sigunmask(clnt, &oldmask);
					nfs_wait_schedule, TASK_KILLABLE);

	return error;
}
Loading