Re: [PATCH 1/2] vfs: Allow filesystems with foreign owner IDs to override UID checks

Christian Brauner <[email protected]> Wed, 29 Oct 2025 13:39:45 +0100
Newsgroups gmane.linux.kernel,gmane.comp.file-systems.openafs.devel,gmane.linux.kernel.cifs,gmane.linux.nfs,gmane.linux.file-systems
Message-ID <20251029-brust-reden-b61f1a55dc3b@brauner>
On Tue, Oct 21, 2025 at 02:20:21PM +0100, David Howells wrote:
> Christian Brauner <[email protected]> wrote:
> 
> > > +	if (unlikely(inode->i_op->have_same_owner)) {
> > 
> > Same, as above: similar to IOP_FASTPERM this should use a flag to avoid pointer derefs.
> 
> Can we do these IOP_* flags better?  Surely we can determine at the point the
> inode has its ->i_op assigned that these things are provided?  This optimises
> the case where they don't exist at the expense of the case where they do (we
> still have to check the pointer every time).
> 
> > > +	if (unlikely(inode->i_op->have_same_owner)) {

I think I mentioned this off-list. It looks like we can but I don't know
if there was any history behind not doing it that way. But please try.