public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, linux-security-module@wirex.com
Subject: Re: [PATCH] LSM changes for 2.5.62
Date: Wed, 19 Feb 2003 15:43:14 -0800	[thread overview]
Message-ID: <20030219234314.GH18590@kroah.com> (raw)
In-Reply-To: <20030219234302.GG18590@kroah.com>

ChangeSet 1.914.163.3, 2003/02/17 14:32:23-08:00, sds@epoch.ncsc.mil

[PATCH] LSM: coding style fixups in sb_kern_mount

This patch moves the error handling code for the sb_kern_mount hook call
out of line, per Christoph Hellwig's suggestion.


diff -Nru a/fs/super.c b/fs/super.c
--- a/fs/super.c	Wed Feb 19 15:38:39 2003
+++ b/fs/super.c	Wed Feb 19 15:38:39 2003
@@ -623,12 +623,8 @@
 	if (IS_ERR(sb))
 		goto out_mnt;
  	error = security_sb_kern_mount(sb);
- 	if (error) {
- 		up_write(&sb->s_umount);
- 		deactivate_super(sb);
- 		sb = ERR_PTR(error);
- 		goto out_mnt;
- 	}
+ 	if (error) 
+ 		goto out_sb;
 	mnt->mnt_sb = sb;
 	mnt->mnt_root = dget(sb->s_root);
 	mnt->mnt_mountpoint = sb->s_root;
@@ -636,6 +632,10 @@
 	up_write(&sb->s_umount);
 	put_filesystem(type);
 	return mnt;
+out_sb:
+	up_write(&sb->s_umount);
+	deactivate_super(sb);
+	sb = ERR_PTR(error);
 out_mnt:
 	free_vfsmnt(mnt);
 out:

  reply	other threads:[~2003-02-19 23:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-19 23:41 [BK PATCH] LSM changes for 2.5.62 Greg KH
2003-02-19 23:42 ` [PATCH] " Greg KH
2003-02-19 23:42   ` Greg KH
2003-02-19 23:42     ` Greg KH
2003-02-19 23:42       ` Greg KH
2003-02-19 23:42         ` Greg KH
2003-02-19 23:43           ` Greg KH
2003-02-19 23:43             ` Greg KH [this message]
2003-02-19 23:43               ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030219234314.GH18590@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@wirex.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox