Re: [PATCH] fs/ext4: mb_find_order_for_block(): silence UBSAN

2016-04-17 Thread Nicolai Stange
Nicolai Stange writes: > Currently, in mb_find_order_for_block(), there's a loop like the following: > > while (order <= e4b->bd_blkbits + 1) { > ... > bb += 1 << (e4b->bd_blkbits - order); > } > > Note that the updated bb is used in the loop's next iteration only. > > However, at the

Re: [PATCH] fs/ext4: mb_find_order_for_block(): silence UBSAN

2016-03-19 Thread Nicolai Stange
Please drop in favour of v2. Thank you and sorry for the noise, Nicolai

[PATCH] fs/ext4: mb_find_order_for_block(): silence UBSAN

2016-03-19 Thread Nicolai Stange
Currently, in mb_find_order_for_block(), there's a loop like the following: while (order <= e4b->bd_blkbits + 1) { ... bb += 1 << (e4b->bd_blkbits - order); } Note that the updated bb is used in the loop's next iteration only. However, at the last iteration, that is at order == e4b->