From patchwork Wed May 31 12:55:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13262211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 387C0C7EE2E for ; Wed, 31 May 2023 12:57:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236126AbjEaM5K (ORCPT ); Wed, 31 May 2023 08:57:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236175AbjEaM4w (ORCPT ); Wed, 31 May 2023 08:56:52 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23C41186; Wed, 31 May 2023 05:56:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=yNfxLrWSKMQ1L/coufSFF/AHaRvjvn5eGandAFcc5MM=; b=HjoU3qoq8OAeFYzOy6qCBwVw90 ghE7PrPFy1c3S5fEiEmJxEO03j9a/DlgnPbdt7jZTXu6OfUw66wXuC+tj1TXLma8kci5WgrzAvS9U hrthPCxBh97HX7R/7iuh1LySGzV8ZCU1KtGj0Crd18yqoQq9tPAsXrDfA6gP+vL42absl+WDrZgbG 4wWY6bFzgeR4TjjK72zxJ4A7vOzHWWtye7YTnt0FnPDeVibVxv8Q7kIzgrgRWlNkAHDt1VJFz+TQv IvPBQcYL1BHF/0yfoy+meZ4lG6iYXxEI480Nq438OGDvKJOUVO1RDd4BAp8kGCZdo57OPzZtGAJM7 GtiJGDeg==; Received: from [2001:4bb8:182:6d06:2e49:a56:513a:92ee] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q4LN4-00HR5q-0p; Wed, 31 May 2023 12:56:10 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Mike Snitzer , Joern Engel , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Pavel Machek , Loic Poulain , dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH 06/24] init: rename mount_block_root to mount_root_generic Date: Wed, 31 May 2023 14:55:17 +0200 Message-Id: <20230531125535.676098-7-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230531125535.676098-1-hch@lst.de> References: <20230531125535.676098-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org mount_block_root is also used to mount non-block file systems, so give it a better name. Signed-off-by: Christoph Hellwig --- init/do_mounts.c | 6 +++--- init/do_mounts.h | 2 +- init/do_mounts_initrd.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/init/do_mounts.c b/init/do_mounts.c index 2fe7901b5bcfaf..a2c0baace0992c 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -391,7 +391,7 @@ static int __init do_mount_root(const char *name, const char *fs, return ret; } -void __init mount_block_root(char *name, int flags) +void __init mount_root_generic(char *name, int flags) { struct page *page = alloc_page(GFP_KERNEL); char *fs_names = page_address(page); @@ -589,7 +589,7 @@ void __init mount_root(void) if (err < 0) pr_emerg("Failed to create /dev/root: %d\n", err); - mount_block_root("/dev/root", root_mountflags); + mount_root_generic("/dev/root", root_mountflags); } #endif } @@ -620,7 +620,7 @@ void __init prepare_namespace(void) root_device_name = saved_root_name; if (!strncmp(root_device_name, "mtd", 3) || !strncmp(root_device_name, "ubi", 3)) { - mount_block_root(root_device_name, root_mountflags); + mount_root_generic(root_device_name, root_mountflags); goto out; } ROOT_DEV = name_to_dev_t(root_device_name); diff --git a/init/do_mounts.h b/init/do_mounts.h index 7a29ac3e427bab..33623025f6951a 100644 --- a/init/do_mounts.h +++ b/init/do_mounts.h @@ -10,7 +10,7 @@ #include #include -void mount_block_root(char *name, int flags); +void mount_root_generic(char *name, int flags); void mount_root(void); extern int root_mountflags; diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index 34731241377d30..686d1ff3af4bb1 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -95,7 +95,7 @@ static void __init handle_initrd(void) real_root_dev = new_encode_dev(ROOT_DEV); create_dev("/dev/root.old", Root_RAM0); /* mount initrd on rootfs' /root */ - mount_block_root("/dev/root.old", root_mountflags & ~MS_RDONLY); + mount_root_generic("/dev/root.old", root_mountflags & ~MS_RDONLY); init_mkdir("/old", 0700); init_chdir("/old");