Re: [PATCH v2 4/5] mpage: use folios in bio end_io handler

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

 



> +	bio_for_each_folio_all(fi, bio) {
> +		if (!err)
> +			folio_mark_uptodate(fi.folio);
> +		else
> +			folio_set_error(fi.folio);
> +		folio_unlock(fi.folio);

Super nitpicky, but I'd avoid inverted conditions unless there is a
very clear benefit.  I.e. I'd rather write this as:

		if (err)
			folio_set_error(fi.folio);
		else
			folio_mark_uptodate(fi.folio);

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>



[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