Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 392db380 authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe
Browse files

zram: Delete gendisk before cleaning up the request queue



Remove the disk, partition and bdi sysfs attributes before cleaning up
the request queue associated with the disk.

Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d8115c35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1620,8 +1620,8 @@ static int zram_remove(struct zram *zram)

	pr_info("Removed device: %s\n", zram->disk->disk_name);

	blk_cleanup_queue(zram->disk->queue);
	del_gendisk(zram->disk);
	blk_cleanup_queue(zram->disk->queue);
	put_disk(zram->disk);
	kfree(zram);
	return 0;