[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101029160955.GU19804@ZenIV.linux.org.uk>
Date: Fri, 29 Oct 2010 17:09:56 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Chun Wu <chun.wu84@...il.com>
Cc: axboe@...nel.dk, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block: missing module_put in put_disk
On Fri, Oct 29, 2010 at 11:51:35AM -0400, Chun Wu wrote:
> From: Chun Wu <chun.wu84@...il.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]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists