]> git.baikalelectronics.ru Git - kernel.git/commit
md/bitmap: don't pass -1 to bitmap_storage_alloc.
authorNeilBrown <neilb@suse.com>
Thu, 1 Oct 2015 06:03:38 +0000 (16:03 +1000)
committerNeilBrown <neilb@suse.com>
Fri, 2 Oct 2015 07:24:13 +0000 (17:24 +1000)
commit5c0e92d5c09bf9819f5df4cb53472e23c0c6a368
treecc7f1bf1d5b2e213bc3ff759d8dcf3c318907da7
parent5cf03d8bd28a8572d1f1ac0b0e4fa28592afdfab
md/bitmap: don't pass -1 to bitmap_storage_alloc.

Passing -1 to bitmap_storage_alloc() causes page->index to be set to
-1, which is quite problematic.

So only pass ->cluster_slot if mddev_is_clustered().

Fixes: 8807f79e690e ("Use separate bitmaps for each nodes in the cluster")
Cc: stable@vger.kernel.org (v4.1+)
Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/bitmap.c