blk-mq: for_each_* macro correctness
authorJose Alonso <joalonsof@gmail.com>
Tue, 18 Feb 2014 17:27:36 +0000 (09:27 -0800)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:42 +0000 (12:54 -0600)
commit0733df39d44f459cf42e479e1ddcd2401a621d45
tree3ab6f704eb452a65c0563386c1a21602dd272334
parent73a2a29cb67107218707f645a401a446d8898ff5
blk-mq: for_each_* macro correctness

I observed that there are for_each macros that do an extra memory access
beyond the defined area.
Normally this does not cause problems.
But, this can cause exceptions. For example: if the area is allocated at
the end of a page and the next page is not accessible.

For correctness, I suggest changing the arguments of the 'for loop' like
others 'for_each' do in the kernel.

Signed-off-by: Jose Alonso <joalonsof@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
include/linux/blk-mq.h