Re: [PATCH 02/13] block: refactor bd_may_claim

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

 



On Tue, May 30, 2023 at 01:41:48PM +0200, Jan Kara wrote:
> > +	if (bdev->bd_holder) {
> > +		/*
> > +		 * The same holder can always re-claim.
> > +		 */
> > +		if (bdev->bd_holder == holder)
> > +			return true;
> > +		return false;
> 
> With this simple condition I'd just do:
> 		/* The same holder can always re-claim. */
> 		return bdev->bd_holder == holder;

As of this patch this makes sense, and I did in fact did it that
way first.  But once we start checking the holder ops we need
the eplcicit conditional, so I decided to start out with this more
verbose option to avoid churn later.



[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