Re: [PATCH] LSM changes for 2.5.62

From: Greg KH (gregat_private)
Date: Wed Feb 19 2003 - 15:43:14 PST

  • Next message: Greg KH: "Re: [PATCH] LSM changes for 2.5.62"

    ChangeSet 1.914.163.3, 2003/02/17 14:32:23-08:00, sdsat_private
    
    [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:
    _______________________________________________
    linux-security-module mailing list
    linux-security-moduleat_private
    http://mail.wirex.com/mailman/listinfo/linux-security-module
    



    This archive was generated by hypermail 2b30 : Wed Feb 19 2003 - 16:03:50 PST