From: Al Viro <viro@ZenIV.linux.org.uk>
To: Chun Wu <chun.wu84@gmail.com>
Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: missing module_put in put_disk
Date: Fri, 29 Oct 2010 17:09:56 +0100 [thread overview]
Message-ID: <20101029160955.GU19804@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1288367495-2919-1-git-send-email-chun@gmail.com>
On Fri, Oct 29, 2010 at 11:51:35AM -0400, Chun Wu wrote:
> From: Chun Wu <chun.wu84@gmail.com>
>
> module_put function is not called in put_disk function. Should it be added?
Check the callers. Check the callers of get_disk. Think whether those
two are counterparts. See if any callers would have module_put() nearby.
See if any callers would not have module_put() nearby. See if there is
anything that would distinguish one class from another. Think whether
they need different behaviour. Then you'll be able to answer your
question. As a bonus, consider the source of confusion and see if you
can remove it [I'm serious, BTW - get_disk() is apparently a lousy name
asking for confusion; renaming it might be a useful thing to do, provided
that new name would be less confusing]
[snip the patch blindly adding such call]
prev parent reply other threads:[~2010-10-29 16:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-29 15:51 [PATCH] block: missing module_put in put_disk Chun Wu
2010-10-29 16:09 ` Al Viro [this message]
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=20101029160955.GU19804@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=axboe@kernel.dk \
--cc=chun.wu84@gmail.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 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.