From: Li Zefan Date: Fri, 31 Jul 2009 06:55:48 +0000 (+0200) Subject: io context: fix ref counting X-Git-Tag: MMI-PSA29.97-13-9~27247^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cbb4f2646d77b536ed2b1500ef6641083228ed8f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git io context: fix ref counting Commit d9c7d394a8ebacb60097b192939ae9f15235225e ("block: prevent possible io_context->refcount overflow") mistakenly changed atomic_inc(&ioc->nr_tasks) to atomic_long_inc(&ioc->refcount). Signed-off-by: Li Zefan Acked-by: Nikanth Karthikesan Signed-off-by: Jens Axboe --- diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index dd05434fa45f..4da4a75c3f1e 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h @@ -92,7 +92,7 @@ static inline struct io_context *ioc_task_link(struct io_context *ioc) * a race). */ if (ioc && atomic_long_inc_not_zero(&ioc->refcount)) { - atomic_long_inc(&ioc->refcount); + atomic_inc(&ioc->nr_tasks); return ioc; }