linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: overlayfs <linux-unionfs@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] overlayfs update for 6.16
Date: Thu, 5 Jun 2025 12:34:19 -0700	[thread overview]
Message-ID: <CAHk-=wgH174aR4HnpmV7yVYVjS7VmSRC31md5di7_Cr_v0Afqg@mail.gmail.com> (raw)
In-Reply-To: <CAJfpegvB3At5Mm54eDuNVspuNtkhoJwPH+HcOCWm7j-CSQ1jbw@mail.gmail.com>

On Thu, 5 Jun 2025 at 07:51, Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> - The above fix contains a cast to non-const, which is not actually
> needed.  So add the necessary helpers postfixed with _c that allow the
> cast to be removed (touches vfs files but only in trivial ways)

Grr.

I despise those "trivial ways".

In particular, I despise how this renames the backing_file_user_path()
helper to something actively *worse*.

The "_c()" makes no sense as a name. Yes, I realize that the "c"
stands for "const", but it still makes absolutely zero sense, since
everybody wants the const version.

The only user of the non-const version is the *ointernal*
implementation that is never exported to other modules, and that could
have the special name.

Although I suspect it doesn't even need it, it could just use the
backing_file(f) macro directly and that should just be moved to
internal.h, and then the 'const'ness would come from the argument as
required.

In fact, most of the _internal_ vfs users don't even want the
non-const version, ie as far as I can tell the user in
file_get_write_access() would be perfectly happy with the const
version too.

So you made the *normal* case have an odd name, and then kept the old
sane name for the case nobody else really wants to see.

If anything, the internal non-const version is the one that should be
renamed (and *not* using some crazy "_nc()" postfix nasty crud). Not
the one that gets exported and that everybody wants.

So I could fix up that last commit to not hate it, but honestly, I
don't want that broken state in the kernel in the first place.

Please do that thing properly. Not this hacky and bass-ackwards way.

             Linus

  reply	other threads:[~2025-06-05 19:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 14:51 [GIT PULL] overlayfs update for 6.16 Miklos Szeredi
2025-06-05 19:34 ` Linus Torvalds [this message]
2025-06-06  6:17   ` Amir Goldstein
2025-06-06  6:36     ` Miklos Szeredi
2025-06-06  9:33       ` Miklos Szeredi
2025-06-07 10:41         ` Amir Goldstein

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='CAHk-=wgH174aR4HnpmV7yVYVjS7VmSRC31md5di7_Cr_v0Afqg@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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;
as well as URLs for NNTP newsgroup(s).