block: move sysfs methods shared by disks and partitions to genhd.c
authorChristoph Hellwig <hch@lst.de>
Tue, 24 Mar 2020 07:25:13 +0000 (08:25 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 24 Mar 2020 13:57:07 +0000 (07:57 -0600)
commit3ad5cee5cd000dc05e6c2410b06fc1d818e7b1e9
tree9c23b9cb8c1538219ad6656abbef12ce26f307ea
parent5cbd28e3cef14b43b2a8271d36b75fc61c13bb8a
block: move sysfs methods shared by disks and partitions to genhd.c

Move the sysfs _show methods that are used both on the full disk and
partition nodes to genhd.c instead of hiding them in the partitioning
code.  Also move the declaration for these methods to block/blk.h so
that we don't expose them to drivers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk.h
block/genhd.c
block/partition-generic.c
include/linux/genhd.h