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: