author: Christoph Hellwig <hch@lst.de> 2021-05-25 08:13:00 +0200
committer: Jens Axboe <axboe@kernel.dk> 2021-06-01 07:45:49 -0600
commit: c97d93c31e5734a16bfe663085ec91b8c9fb20f9
parent: ab4b57057d744861f670b47b163209727b26418b
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 7 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index a78e44ee6adb..74aede860de7 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -133,14 +133,8 @@ static dev_t devt_from_partuuid(const char *uuid_str)
* Attempt to find the requested partition by adding an offset
* to the partition number found by UUID.
*/
- struct block_device *part;
-
- part = bdget_disk(dev_to_disk(dev),
- dev_to_bdev(dev)->bd_partno + offset);
- if (part) {
- devt = part->bd_dev;
- bdput(part);
- }
+ devt = part_devt(dev_to_disk(dev),
+ dev_to_bdev(dev)->bd_partno + offset);
} else {
devt = dev->devt;
}