lkml.org 
[lkml]   [2003]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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/
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.032 / U:1.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site