[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjRukhPxmDFAk+aAZEcA_RQvmbOoJGOw6w2RBSDd1Nmwg@mail.gmail.com>
Date: Mon, 18 Mar 2024 12:41:49 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Christian Brauner <brauner@...nel.org>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] vfs fixes
On Mon, 18 Mar 2024 at 12:14, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> IOW, isn't the 'get()' always basically paired with the mounting? And
> the 'put()' would probably be best done iin kill_block_super()?
. or alternative handwavy approach:
The fundamental _reason_ for the ->get/put seems to be to make the
'holder' lifetime be at least as long as the 'struct file' it is
associated with. No?
So how about we just make the 'holder' always *be* a 'struct file *'? That
(a) gets rid of the typeless 'void *' part
(b) is already what it is for normal cases (ie O_EXCL file opens).
wouldn't it be lovely if we just made the rule be that 'holder' *is*
the file pointer, and got rid of a lot of typeless WTF code?
Again, this comment (and the previous email) is more based on "this
does not feel right to me" than anything else.
That code just makes my skin itch. I can't say it's _wrong_, but it
just FeelsWrongToMe(tm).
Linus
Powered by blists - more mailing lists