summaryrefslogtreecommitdiffstats
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2018-01-09 20:46:49 -0500
committerJens Axboe <axboe@kernel.dk>2018-01-15 08:41:38 -0700
commitbc8d062c36e3525e81ea8237ff0ab3264c2317b6 (patch)
tree9385753a2d290add6cad65051d08db5ed5223e2c /block/blk-sysfs.c
parentbf9ae8c5325c0070d0ec81a849bba8d156f65993 (diff)
downloadlinux-0-day-bc8d062c36e3525e81ea8237ff0ab3264c2317b6.tar.gz
linux-0-day-bc8d062c36e3525e81ea8237ff0ab3264c2317b6.tar.xz
block: only bdi_unregister() in del_gendisk() if !GENHD_FL_HIDDEN
device_add_disk() will only call bdi_register_owner() if !GENHD_FL_HIDDEN, so it follows that del_gendisk() should only call bdi_unregister() if !GENHD_FL_HIDDEN. Found with code inspection. bdi_unregister() won't do any harm if bdi_register_owner() wasn't used but best to avoid the unnecessary call to bdi_unregister(). Fixes: 8ddcd65325 ("block: introduce GENHD_FL_HIDDEN") Signed-off-by: Mike Snitzer <snitzer@redhat.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-sysfs.c')
0 files changed, 0 insertions, 0 deletions