Re: [PATCH V2] block: add bio_truncate to fix guard_bio_eod

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

 



> +void bio_truncate(struct bio *bio, unsigned new_size)

This function really needs a kerneldoc or similar comment describing
what it does in detail.

> +	if (bio_data_dir(bio) != READ)
> +		goto exit;

This really should check the passed in op for REQ_OP_READ directly instead
of just the direction on the potentially not fully set up bio.



[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