Commit b159e86b authored by Ondrej Mosnacek's avatar Ondrej Mosnacek Committed by Paul Moore
Browse files

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: default avatarOndrej Mosnacek <omosnace@redhat.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 200ea5a2
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;
+0 −1
Original line number Diff line number Diff line
@@ -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 */