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

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

 



On Thu 01-06-23 10:11:05, Christoph Hellwig wrote:
> 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.

Ah, OK.

								Honza

-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux