linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Questionable comment for rpc_execute()
@ 2011-06-30 22:57 Ben Greear
  0 siblings, 0 replies; only message in thread
From: Ben Greear @ 2011-06-30 22:57 UTC (permalink / raw)
  To: linux-nfs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-06-30 22:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-30 22:57 Questionable comment for rpc_execute() Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).