summaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-10-06 06:15:04 -0600
committerJens Axboe <axboe@kernel.dk>2021-10-19 05:53:22 -0600
commitdb9a02baa23267c695a44234a0f2f4607992780e (patch)
tree5763bbfbcb0774571843d21bcd340cc219ff397b /block/genhd.c
parente0d78afeb8d190164a823d5ef5821b0b3802af33 (diff)
block: move bdev_read_only() into the header
This is called for every write in the fast path, move it inline next to get_disk_ro() which is called internally. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 759bc06810f8..80943c123c3e 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1389,12 +1389,6 @@ void set_disk_ro(struct gendisk *disk, bool read_only)
}
EXPORT_SYMBOL(set_disk_ro);
-int bdev_read_only(struct block_device *bdev)
-{
- return bdev->bd_read_only || get_disk_ro(bdev->bd_disk);
-}
-EXPORT_SYMBOL(bdev_read_only);
-
void inc_diskseq(struct gendisk *disk)
{
disk->diskseq = atomic64_inc_return(&diskseq);