Re: [PATCH V2 1/2] block: don't call into iov_iter_revert if nothing is left

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

 



>  	if (bio->bi_bdev) {
>  		size_t trim = size & (bdev_logical_block_size(bio->bi_bdev) - 1);
> -		iov_iter_revert(iter, trim);
> -		size -= trim;
> +
> +		if (trim) {
> +			iov_iter_revert(iter, trim);
> +			size -= trim;
> +		}

We also need to fix this.  This isn't supposed to be called without
a bdev set, but Kent broke this.  But if we don't have a bdev
we need to pass the block size manually and still do the revert if needed.





[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