We should use Z2MINOR_COUNT as range argument in blk_unregister_region()
Signed-off-by: Zhao Lei <[email protected]>
---
drivers/block/z2ram.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index 4575171..b259040 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -374,7 +374,7 @@ err:
static void __exit z2_exit(void)
{
int i, j;
- blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), 256);
+ blk_unregister_region(MKDEV(Z2RAM_MAJOR, 0), Z2MINOR_COUNT);
unregister_blkdev(Z2RAM_MAJOR, DEVICE_NAME);
del_gendisk(z2ram_gendisk);
put_disk(z2ram_gendisk);
--
1.5.5.3
Zhaolei wrote:
> We should use Z2MINOR_COUNT as range argument in blk_unregister_region()
>
> Signed-off-by: Zhao Lei <[email protected]>
Committed to #tj-block-for-linus (temp branch to collect block layer
patches while Jens is gone).
git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git tj-block-for-linus
Thanks.
--
tejun