From: Louis Rilling <louis.rilling@kerlabs.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org, Louis Rilling <louis.rilling@kerlabs.com>
Subject: [PATCH 1/2] block: Fix io_context leak after clone with CLONE_IO
Date: Fri, 4 Dec 2009 14:52:41 +0100 [thread overview]
Message-ID: <1259934762-16920-2-git-send-email-louis.rilling@kerlabs.com> (raw)
In-Reply-To: <1259934762-16920-1-git-send-email-louis.rilling@kerlabs.com>
With CLONE_IO, copy_io() increments both ioc->refcount and ioc->nr_tasks.
However exit_io_context() only decrements ioc->refcount if ioc->nr_tasks
reaches 0.
Always call put_io_context() in exit_io_context().
Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
---
block/blk-ioc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index d4ed600..dcd0412 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -80,8 +80,8 @@ void exit_io_context(void)
ioc->aic->exit(ioc->aic);
cfq_exit(ioc);
- put_io_context(ioc);
}
+ put_io_context(ioc);
}
struct io_context *alloc_io_context(gfp_t gfp_flags, int node)
--
1.5.6.5
next prev parent reply other threads:[~2009-12-04 13:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-04 13:52 [RFC] block: io_context refcount fixes Louis Rilling
2009-12-04 13:52 ` Louis Rilling [this message]
2009-12-04 13:52 ` [PATCH 2/2] block: Fix io_context leak after failure of clone with CLONE_IO Louis Rilling
2009-12-04 15:34 ` [RFC] block: io_context refcount fixes Jens Axboe
2009-12-04 16:03 ` Louis Rilling
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=1259934762-16920-2-git-send-email-louis.rilling@kerlabs.com \
--to=louis.rilling@kerlabs.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®