From: Rusty Russell <rusty@rustcorp.com.au>
To: "Fernando Luis Vázquez Cao" <fernando@oss.ntt.co.jp>
Cc: dedekind@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] try_module_get usage
Date: Wed, 11 Jul 2007 20:18:01 +1000 [thread overview]
Message-ID: <1184149081.6005.606.camel@localhost.localdomain> (raw)
In-Reply-To: <1184140531.4608.16.camel@sebastian.kern.oss.ntt.co.jp>
On Wed, 2007-07-11 at 16:55 +0900, Fernando Luis Vázquez Cao wrote:
> I keep seeing uses of try_module_get(THIS_MODULE) which seem to mimic
> the behavior of the former MOD_INC_USE_COUNT. The UBI driver is one
> example:
>
> int ubi_get_device_info(int ubi_num, struct ubi_device_info *di)
> {
> const struct ubi_device *ubi;
>
> if (!try_module_get(THIS_MODULE))
> return -ENODEV;
Yes, this code is wrong.
Thanks,
Rusty.
prev parent reply other threads:[~2007-07-11 10:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 7:55 [PATCH RFC] try_module_get usage Fernando Luis Vázquez Cao
2007-07-11 8:11 ` [PATCH] UBI: cleanup usage of try_module_get Fernando Luis Vázquez Cao
2007-07-11 9:17 ` Artem Bityutskiy
2007-07-11 9:41 ` [PATCH RFC] try_module_get usage Christoph Hellwig
2007-07-11 10:01 ` Artem Bityutskiy
2007-07-11 10:18 ` Rusty Russell [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=1184149081.6005.606.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=dedekind@infradead.org \
--cc=fernando@oss.ntt.co.jp \
--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