Re: [PATCH 2/3] fs: improve naming for fsid helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 18, 2021 at 06:30:50AM +0000, Al Viro wrote:
> On Thu, Mar 18, 2021 at 07:27:23AM +0100, Christoph Hellwig wrote:
> > > -static inline kuid_t fsuid_into_mnt(struct user_namespace *mnt_userns)
> > > +static inline kuid_t idmapped_fsuid(struct user_namespace *mnt_userns)
> > >  {
> > >  	return kuid_from_mnt(mnt_userns, current_fsuid());
> > >  }
> > >  
> > > -static inline kgid_t fsgid_into_mnt(struct user_namespace *mnt_userns)
> > > +static inline kgid_t idmapped_fsgid(struct user_namespace *mnt_userns)
> > >  {
> > >  	return kgid_from_mnt(mnt_userns, current_fsgid());
> > >  }
> > 
> > I'm not sure the naming is an improvement.  I always think of
> > identity mapped when reading it, which couldn't be further from what
> > it does..  But either way comments describing what these helpers do
> > would be very useful.
> 
> s/idmapped/mapped/?

Yeah, I think that's a good idea.

I'll also add comments.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux