OSDN Git Service

block: Remove "dying" checks from sysfs callbacks
authorBart Van Assche <bvanassche@acm.org>
Mon, 30 Sep 2019 23:00:43 +0000 (16:00 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 7 Oct 2019 14:31:59 +0000 (08:31 -0600)
commitbae85c156f619939ef6261f1bd4fabbe24361b50
treec84786cb0148d7e0a5d0ded9b903d6bcc5aeadd8
parent9566256518de0520c964bdf23140eac324b136af
block: Remove "dying" checks from sysfs callbacks

Block drivers must call del_gendisk() before blk_cleanup_queue().
del_gendisk() calls kobject_del() and kobject_del() waits until any
ongoing sysfs callback functions have finished. In other words, the
sysfs callback functions won't be called for a queue in the dying
state. Hence remove the "dying" checks from the sysfs callback
functions.

Cc: Christoph Hellwig <hch@infradead.org>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-mq-sysfs.c
block/blk-sysfs.c