]> git.baikalelectronics.ru Git - kernel.git/commit
md/bitmap: fix calculation of 'chunks' - missing shift.
authorNeilBrown <neilb@suse.de>
Fri, 4 May 2012 07:03:18 +0000 (17:03 +1000)
committerNeilBrown <neilb@suse.de>
Fri, 4 May 2012 07:03:18 +0000 (17:03 +1000)
commit672b98efd19572adfe33f2bc54b6e7fbbd742a55
treeba5b2e72e04a18a4bd83429f089d16637b9a6343
parent4eef5766f65daf1741a7f346ba2469bd2c376574
md/bitmap: fix calculation of 'chunks' - missing shift.

commit cc4d6c0c "md/bitmap: discard CHUNK_BLOCK_SHIFT macro"
replaced CHUNK_BLOCK_RATIO() by the same text that was
replacing CHUNK_BLOCK_SHIFT() - which is clearly wrong.

The result is that 'chunks' is often too small by 1,
which can sometimes result in a crash (not sure how).

So use the correct replacement, and get rid of CHUNK_BLOCK_RATIO
which is no longe used.

Reported-by: Karl Newman <siliconfiend@gmail.com>
Tested-by: Karl Newman <siliconfiend@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/bitmap.c
drivers/md/bitmap.h