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

Kirill Tkhai ktkhai at virtuozzo.com
Thu Dec 23 10:12:12 MSK 2021


In this file we already have:

	static struct vfsmount *mnt;

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