summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block/genhd.c2
-rw-r--r--include/linux/blkdev.h8
2 files changed, 1 insertions, 9 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 712031ce1907..36532b931841 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1019,7 +1019,7 @@ static ssize_t disk_discard_alignment_show(struct device *dev,
{
struct gendisk *disk = dev_to_disk(dev);
- return sprintf(buf, "%d\n", queue_discard_alignment(disk->queue));
+ return sprintf(buf, "%d\n", bdev_alignment_offset(disk->part0));
}
static ssize_t diskseq_show(struct device *dev,
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 0a1795ac2627..5a9b7aeda010 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1253,14 +1253,6 @@ bdev_zone_write_granularity(struct block_device *bdev)
int bdev_alignment_offset(struct block_device *bdev);
-static inline int queue_discard_alignment(const struct request_queue *q)
-{
- if (q->limits.discard_misaligned)
- return -1;
-
- return q->limits.discard_alignment;
-}
-
static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector_t sector)
{
unsigned int alignment, granularity, offset;