[Devel] [PATCH RHEL9 COMMIT] devtmpfs: Do not reuse name of existing varible

Konstantin Khorenko khorenko at virtuozzo.com
Mon Dec 27 15:04:16 MSK 2021


The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-4.vz9.10.37
------>
commit 7f8c7e8b4efe947b4258be0e3be8886bd333d679
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Mon Dec 27 15:04:16 2021 +0300

    devtmpfs: Do not reuse name of existing varible
    
    In this file we already have:
    
            static struct vfsmount *mnt;
    
    To_merge: 94b8f0262a0c ("ve/devtmpfs: lightweight virtualization")
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/base/devtmpfs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
index b3a3cbe65daa..6d6236318d83 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -449,15 +449,15 @@ static int __ref devtmpfsd(void *p)
 int ve_mount_devtmpfs(struct ve_struct *ve)
 {
 	char opts[] = "mode=0755";
-	struct vfsmount *mnt;
+	struct vfsmount *ve_mnt;
 
-	mnt = vfs_kern_mount(&internal_fs_type, 0, "devtmpfs", opts);
-	if (IS_ERR(mnt)) {
+	ve_mnt = vfs_kern_mount(&internal_fs_type, 0, "devtmpfs", opts);
+	if (IS_ERR(ve_mnt)) {
 		printk(KERN_ERR "CT#%s: devtmpfs: unable to create devtmpfs %ld\n",
-		       ve_name(ve), PTR_ERR(mnt));
-		return PTR_ERR(mnt);
+		       ve_name(ve), PTR_ERR(ve_mnt));
+		return PTR_ERR(ve_mnt);
 	}
-	ve->devtmpfs_mnt = mnt;
+	ve->devtmpfs_mnt = ve_mnt;
 
 	return 0;
 }


More information about the Devel mailing list