mirror of https://gitee.com/openkylin/linux.git
selinux: drop super_block backpointer from superblock_security_struct
It appears to have been needed for selinux_complete_init() in the past, but today it's useless. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
200ea5a229
commit
b159e86b5a
|
@ -600,7 +600,7 @@ static int selinux_set_mnt_opts(struct super_block *sb,
|
|||
{
|
||||
const struct cred *cred = current_cred();
|
||||
struct superblock_security_struct *sbsec = sb->s_security;
|
||||
struct dentry *root = sbsec->sb->s_root;
|
||||
struct dentry *root = sb->s_root;
|
||||
struct selinux_mnt_opts *opts = mnt_opts;
|
||||
struct inode_security_struct *root_isec;
|
||||
u32 fscontext_sid = 0, context_sid = 0, rootcontext_sid = 0;
|
||||
|
@ -1080,7 +1080,7 @@ static int selinux_sb_show_options(struct seq_file *m, struct super_block *sb)
|
|||
return rc;
|
||||
}
|
||||
if (sbsec->flags & ROOTCONTEXT_MNT) {
|
||||
struct dentry *root = sbsec->sb->s_root;
|
||||
struct dentry *root = sb->s_root;
|
||||
struct inode_security_struct *isec = backing_inode_security(root);
|
||||
seq_putc(m, ',');
|
||||
seq_puts(m, ROOTCONTEXT_STR);
|
||||
|
@ -2568,7 +2568,6 @@ static int selinux_sb_alloc_security(struct super_block *sb)
|
|||
mutex_init(&sbsec->lock);
|
||||
INIT_LIST_HEAD(&sbsec->isec_head);
|
||||
spin_lock_init(&sbsec->isec_lock);
|
||||
sbsec->sb = sb;
|
||||
sbsec->sid = SECINITSID_UNLABELED;
|
||||
sbsec->def_sid = SECINITSID_FILE;
|
||||
sbsec->mntpoint_sid = SECINITSID_UNLABELED;
|
||||
|
|
|
@ -61,7 +61,6 @@ struct file_security_struct {
|
|||
};
|
||||
|
||||
struct superblock_security_struct {
|
||||
struct super_block *sb; /* back pointer to sb object */
|
||||
u32 sid; /* SID of file system superblock */
|
||||
u32 def_sid; /* default SID for labeling */
|
||||
u32 mntpoint_sid; /* SECURITY_FS_USE_MNTPOINT context for files */
|
||||
|
|
Loading…
Reference in New Issue