Re: [PATCH v3 09/13] fs/verity: use accessors

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

 



On Tue, Jul 22, 2025 at 01:25:31PM -0700, Eric Biggers wrote:
> On Tue, Jul 22, 2025 at 09:27:27PM +0200, Christian Brauner wrote:
> >  static inline void fsverity_cleanup_inode(struct inode *inode)
> >  {
> > -	if (inode->i_verity_info)
> > +	if (inode->i_verity_info || inode->i_sb->s_op->i_fsverity)
> >  		__fsverity_cleanup_inode(inode);
> 
> Similarly to fscrypt_put_encryption_info(): I think this should look
> like:
> 
>     if (IS_VERITY(inode))
>             __fsverity_cleanup_inode(inode);
> 
> i_verity_info != NULL implies IS_VERITY(), so that would work and avoid
> adding extra dereferences to non-verity files.
> 
> The converse isn't necessarily true, but that's okay as long as
> __fsverity_cleanup_inode() handles i_verity_info == NULL.

Done.




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

  Powered by Linux