All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-fsdevel@vger.kernel.org,
	Christian Brauner <brauner@kernel.org>,
	kernel@pengutronix.de
Subject: Re: [PATCH] chardev: Simplify usage of try_module_get()
Date: Tue, 17 Oct 2023 10:54:13 +0100	[thread overview]
Message-ID: <20231017095413.GP800259@ZenIV> (raw)
In-Reply-To: <20231017091353.6fhpmrcx66jj2jls@pengutronix.de>

On Tue, Oct 17, 2023 at 11:13:53AM +0200, Uwe Kleine-König wrote:

> I don't understand what you intend to say here. What is "that"? Are you
> talking about
> 
> 	owner && !try_module_get(owner)
> 
> vs
> 
> 	!try_module_get(owner)
> 
> or the following line with kobject_get_unless_zero? Do you doubt the
> validity of my patch, or is it about something try_module_get()
> could/should do more than it currently does?

I'm saying that it would be a good idea to turn try_module_get() into
an inline in all cases, including the CONFIG_MODULE_UNLOAD one.
Turning it into something like !module || __try_module_get(module),
with the latter being out of line.  With that done, your patch would be
entirely unobjectionable...

  reply	other threads:[~2023-10-17  9:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 13:24 [PATCH] chardev: Simplify usage of try_module_get() Uwe Kleine-König
2023-10-13 15:42 ` Christian Brauner
2023-10-16 22:43 ` Al Viro
2023-10-17  9:13   ` Uwe Kleine-König
2023-10-17  9:54     ` Al Viro [this message]
2023-12-07  9:23       ` Uwe Kleine-König

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=20231017095413.GP800259@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.