[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211130160654.1418231-12-stefanb@linux.ibm.com>
Date: Tue, 30 Nov 2021 11:06:45 -0500
From: Stefan Berger <stefanb@...ux.ibm.com>
To: linux-integrity@...r.kernel.org
Cc: zohar@...ux.ibm.com, serge@...lyn.com,
christian.brauner@...ntu.com, containers@...ts.linux.dev,
dmitry.kasatkin@...il.com, ebiederm@...ssion.com,
krzysztof.struczynski@...wei.com, roberto.sassu@...wei.com,
mpeters@...hat.com, lhinds@...hat.com, lsturman@...hat.com,
puiterwi@...hat.com, jejb@...ux.ibm.com, jamjoom@...ibm.com,
linux-kernel@...r.kernel.org, paul@...l-moore.com, rgb@...hat.com,
linux-security-module@...r.kernel.org, jmorris@...ei.org,
Stefan Berger <stefanb@...ux.ibm.com>
Subject: [RFC 11/20] securityfs: Prefix global variables with securityfs_
Prefix global variables 'mount' and 'mount_count' with securityfs_ so they
are easier to distinguish as variables belonging to securityfs rather than
variables being passed in through new APIs we will introduce.
Signed-off-by: Stefan Berger <stefanb@...ux.ibm.com>
---
security/inode.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/security/inode.c b/security/inode.c
index 6c326939750d..e523829c22cb 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -22,8 +22,8 @@
#include <linux/lsm_hooks.h>
#include <linux/magic.h>
-static struct vfsmount *mount;
-static int mount_count;
+static struct vfsmount *securityfs_mount;
+static int securityfs_mount_count;
static void securityfs_free_inode(struct inode *inode)
{
@@ -66,7 +66,7 @@ static int securityfs_init_fs_context(struct fs_context *fc)
return 0;
}
-static struct file_system_type fs_type = {
+static struct file_system_type securityfs_type = {
.owner = THIS_MODULE,
.name = "securityfs",
.init_fs_context = securityfs_init_fs_context,
@@ -118,12 +118,12 @@ static struct dentry *securityfs_create_dentry(const char *name, umode_t mode,
pr_debug("securityfs: creating file '%s'\n",name);
- error = simple_pin_fs(&fs_type, &mount, &mount_count);
+ error = simple_pin_fs(&securityfs_type, &securityfs_mount, &securityfs_mount_count);
if (error)
return ERR_PTR(error);
if (!parent)
- parent = mount->mnt_root;
+ parent = securityfs_mount->mnt_root;
dir = d_inode(parent);
@@ -168,7 +168,7 @@ static struct dentry *securityfs_create_dentry(const char *name, umode_t mode,
dentry = ERR_PTR(error);
out:
inode_unlock(dir);
- simple_release_fs(&mount, &mount_count);
+ simple_release_fs(&securityfs_mount, &securityfs_mount_count);
return dentry;
}
@@ -309,7 +309,7 @@ void securityfs_remove(struct dentry *dentry)
dput(dentry);
}
inode_unlock(dir);
- simple_release_fs(&mount, &mount_count);
+ simple_release_fs(&securityfs_mount, &securityfs_mount_count);
}
EXPORT_SYMBOL_GPL(securityfs_remove);
@@ -336,7 +336,7 @@ static int __init securityfs_init(void)
if (retval)
return retval;
- retval = register_filesystem(&fs_type);
+ retval = register_filesystem(&securityfs_type);
if (retval) {
sysfs_remove_mount_point(kernel_kobj, "security");
return retval;
--
2.31.1
Powered by blists - more mailing lists