block: ioc_task_link() can't fail
commit3d48749d93a3dce732dd30a14002ab90ec4355f3
authorTejun Heo <tj@kernel.org>
Mon, 5 Mar 2012 21:15:25 +0000 (5 13:15 -0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 6 Mar 2012 20:27:24 +0000 (6 21:27 +0100)
tree50ce414ec87e590493476cf644092439c5f337fd
parent24acfc34fba0b4f62ef9d5c2616eb0faa802b606
block: ioc_task_link() can't fail

ioc_task_link() is used to share %current's ioc on clone.  If
%current->io_context is set, %current is guaranteed to have refcount
on the ioc and, thus, ioc_task_link() can't fail.

Replace error checking in ioc_task_link() with WARN_ON_ONCE() and make
it just increment refcount and nr_tasks.

-v2: Description typo fix (Vivek).

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/iocontext.h
kernel/fork.c