The patch titled Subject: zram: set default dev_id value to zero in zram_init() has been removed from the -mm tree. Its filename was zram-rework-reset-and-destroy-path-fix-2.patch This patch was dropped because it was folded into zram-rework-reset-and-destroy-path.patch ------------------------------------------------------ From: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> Subject: zram: set default dev_id value to zero in zram_init() Set dev_id to zero and fix zram_devices allocation error handling path, can pass uninit dev_id to destroy_devices(). cosmetic: change destroy_devices() message from pr_debug() to pr_info(), as proposed by Minchan Kim. Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> Cc: Ganesh Mahendran <opensource.ganesh@xxxxxxxxx> Cc: Jerome Marchand <jmarchan@xxxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Nitin Gupta <ngupta@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/block/zram/zram_drv.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff -puN drivers/block/zram/zram_drv.c~zram-rework-reset-and-destroy-path-fix-2 drivers/block/zram/zram_drv.c --- a/drivers/block/zram/zram_drv.c~zram-rework-reset-and-destroy-path-fix-2 +++ a/drivers/block/zram/zram_drv.c @@ -1136,12 +1136,12 @@ static void destroy_devices(unsigned int kfree(zram_devices); unregister_blkdev(zram_major, "zram"); - pr_debug("Destroyed %u device(s)\n", nr); + pr_info("Destroyed %u device(s)\n", nr); } static int __init zram_init(void) { - int ret, dev_id; + int ret = -ENOMEM, dev_id = 0; if (num_devices > max_num_devices) { pr_warn("Invalid value for num_devices: %u\n", @@ -1157,10 +1157,8 @@ static int __init zram_init(void) /* Allocate the device array and initialize each one */ zram_devices = kzalloc(num_devices * sizeof(struct zram), GFP_KERNEL); - if (!zram_devices) { - ret = -ENOMEM; + if (!zram_devices) goto out_error; - } for (dev_id = 0; dev_id < num_devices; dev_id++) { ret = create_device(&zram_devices[dev_id], dev_id); _ Patches currently in -mm which might be from sergey.senozhatsky@xxxxxxxxx are origin.patch zram-clean-up-zram_meta_alloc.patch zram-free-meta-table-in-zram_meta_free.patch zram-fix-umount-reset_store-mount-race-condition.patch zram-rework-reset-and-destroy-path.patch zram-rework-reset-and-destroy-path-fix-3.patch zram-check-bd_openers-instead-bd_holders.patch zram-remove-init_lock-in-zram_make_request.patch zram-remove-request_queue-from-struct-zram.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html