commit | c2ee070fb00365d7841f6661dcdc7fbe6620bdf8 | [log] [tgz] |
---|---|---|
author | Christoph Hellwig <hch@lst.de> | Wed Aug 23 19:10:31 2017 +0200 |
committer | Jens Axboe <axboe@kernel.dk> | Wed Aug 23 12:49:53 2017 -0600 |
tree | 9dca74294cfcbba84a8690e88f93590ae51cc35d | |
parent | 807d4af2f64ed79fdbb28e582e330be3dbe10d23 [diff] [blame] |
block: cache the partition index in struct block_device Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/fs/block_dev.c b/fs/block_dev.c index 9941dc8..d29d1c7 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c
@@ -1451,6 +1451,7 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) bdev->bd_disk = disk; bdev->bd_queue = disk->queue; bdev->bd_contains = bdev; + bdev->bd_partno = partno; if (!partno) { ret = -ENXIO;