Re: [patch] block: precedence bug in bio_set_op_attrs() macro

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

 



On Thu, Nov 10, 2016 at 11:04:38PM +0300, Dan Carpenter wrote:
> This code causes a problem for flush_epd_write_bio() because | has
> higher precedence than ?: so it basically turns into:
> 
> 	((bio)->bi_opf |= REQ_SYNC;
> 
> Which is wrong.

Its is.  And while we're at it the macro should really be doing a
= instead of |=.

And we really should stop using it, at least in the block core even
ASAP.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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