Re: [PATCH] block: clean up the check in blkdev_iomap_begin()

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

 



On 6/25/24 04:55, linan666@xxxxxxxxxxxxxxx wrote:
> From: Li Nan<linan122@xxxxxxxxxx>
>
> It is odd to check the offset amidst a series of assignments. Moving this
> check to the beginning of the function makes the code look better.
>
> Signed-off-by: Li Nan<linan122@xxxxxxxxxx>

it is always better to wait for assignments after all the error checks.

I believe you have verified all the callers and make sure none of the
callers rely on these assignments when this function returns -EIO and
this change will not result in change of behavior, if that is the
case :-

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>

-ck






[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