VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Linus Torvalds <torvalds@linux-foundation.org> 2021-06-30 12:12:56 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-06-30 12:12:56 -0700 commit: df668a5fe461bb9d7e899c538acc7197746038f4 parent: df04fbe8680bfe07f3d7487eccff9f768bb02533
Commit Summary:
Merge tag 'for-5.14/block-2021-06-29' of git://git.kernel.dk/linux-block
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;
 	}