All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: linux-nfs@vger.kernel.org
Subject: Questionable comment for rpc_execute()
Date: Thu, 30 Jun 2011 15:57:23 -0700	[thread overview]
Message-ID: <4E0CFF53.3090503@candelatech.com> (raw)

The comment below says that task is guaranteed to be freed,
but that appears only true for non-async tasks.

Also, should we lock task->tk_waitqueue before calling rpc_make_runnable
(at least for async tasks)?  I'm basing this question on comments for
rpc_make_runnable claiming to need the spinlock held for the wait-queue
for async tasks.

/*
  * User-visible entry point to the scheduler.
  *
  * This may be called recursively if e.g. an async NFS task updates
  * the attributes and finds that dirty pages must be flushed.
  * NOTE: Upon exit of this function the task is guaranteed to be
  *	 released. In particular note that tk_release() will have
  *	 been called, so your task memory may have been freed.
  */
void rpc_execute(struct rpc_task *task)
{
	rpc_set_active(task);
	rpc_make_runnable(task);
	if (!RPC_IS_ASYNC(task))
		__rpc_execute(task);
}

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


                 reply	other threads:[~2011-06-30 22:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E0CFF53.3090503@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.