Re: [PATCH v15 4/9] ext4: Reuse generic_ci_match for ci comparisons

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

 



On Tue, Apr 02, 2024 at 08:43:28PM -0700, Eric Biggers wrote:
> On Tue, Apr 02, 2024 at 06:48:37PM +0300, Eugen Hristev wrote:
> > +		ret = generic_ci_match(parent, fname->usr_fname,
> > +				       &fname->cf_name, de->name,
> > +				       de->name_len);
> > +		if (ret < 0) {
> > +			/*
> > +			 * Treat comparison errors as not a match.  The
> > +			 * only case where it happens is on a disk
> > +			 * corruption or ENOMEM.
> > +			 */
> > +			return false;
> >  		}
> > -		return !ext4_ci_compare(parent, fname->usr_fname, de->name,
> > -						de->name_len, false);
> > +		return ret;
> 
> Maybe write this as simply 'return ret > 0;'?

Ah, I see that patch 6 adds a check for -EINVAL here, in which case the
'if (ret < 0)' makes sense.

- Eric




[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