Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Wed, 19 Feb 2003 15:43:14 -0800 | From | Greg KH <> | Subject | Re: [PATCH] LSM changes for 2.5.62 |
| |
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: - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |