From: Bart Van Assche <bart.vanassche@wdc.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Bart Van Assche <bart.vanassche@wdc.com>,
Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: [PATCH v5 3/6] zram: Delete gendisk before cleaning up the request queue
Date: Wed, 28 Feb 2018 10:15:30 -0800 [thread overview]
Message-ID: <20180228181533.29402-4-bart.vanassche@wdc.com> (raw)
In-Reply-To: <20180228181533.29402-1-bart.vanassche@wdc.com>
Remove the disk, partition and bdi sysfs attributes before cleaning up
the request queue associated with the disk.
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 0afa6c8c3857..85110e7931e5 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -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;
--
2.16.2
next prev parent reply other threads:[~2018-02-28 18:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-28 18:15 [PATCH v5 0/6] Fix races between blkcg code and request queue initialization and cleanup Bart Van Assche
2018-02-28 18:15 ` [PATCH v5 1/6] block/loop: Delete gendisk before cleaning up the request queue Bart Van Assche
2018-02-28 18:15 ` [PATCH v5 2/6] md: " Bart Van Assche
2018-02-28 18:15 ` Bart Van Assche [this message]
2018-02-28 18:15 ` [PATCH v5 4/6] block: Add 'lock' as third argument to blk_alloc_queue_node() Bart Van Assche
2018-02-28 18:15 ` [PATCH v5 5/6] block: Fix a race between the cgroup code and request queue initialization Bart Van Assche
2018-02-28 18:15 ` [PATCH v5 6/6] block: Fix a race between request queue removal and the block cgroup controller Bart Van Assche
2018-02-28 18:19 ` [PATCH v5 0/6] Fix races between blkcg code and request queue initialization and cleanup Jens Axboe
2018-02-28 19:01 ` Bart Van Assche
2018-02-28 19:08 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180228181533.29402-4-bart.vanassche@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky.work@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox