blk-mq: for_each_* macro correctness
authorJose Alonso <joalonsof@gmail.com>
Tue, 28 Jan 2014 15:09:46 +0000 (08:09 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 28 Jan 2014 15:09:46 +0000 (08:09 -0700)
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@kernel.dk>
include/linux/blk-mq.h

Simple merge