Re: [RFC][PATCH 08/27] sys_mkdirat(): one more goto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 07, 2006 at 05:10:20PM -0700, Dave Hansen wrote:
> 
> Add one more goto to collapse another if().
> 
> This should not cause any functional chagnes.

Acked-by: Herbert Poetzl <herbert@xxxxxxxxxxxx>

> Signed-off-by: Dave Hansen <haveblue@xxxxxxxxxx>
> ---
> 
>  lxc-dave/fs/namei.c |   14 ++++++++------
>  1 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff -puN fs/namei.c~sys_mkdir_at-move-cases-another-goto fs/namei.c
> --- lxc/fs/namei.c~sys_mkdir_at-move-cases-another-goto	2006-06-07 16:53:16.000000000 -0700
> +++ lxc-dave/fs/namei.c	2006-06-07 16:53:16.000000000 -0700
> @@ -1901,12 +1901,14 @@ asmlinkage long sys_mkdirat(int dfd, con
>  		goto out;
>  	dentry = lookup_create(&nd, 1);
>  	error = PTR_ERR(dentry);
> -	if (!IS_ERR(dentry)) {
> -		if (!IS_POSIXACL(nd.dentry->d_inode))
> -			mode &= ~current->fs->umask;
> -		error = vfs_mkdir(nd.dentry->d_inode, dentry, mode);
> -		dput(dentry);
> -	}
> +	if (IS_ERR(dentry))
> +		goto out_unlock;
> +
> +	if (!IS_POSIXACL(nd.dentry->d_inode))
> +		mode &= ~current->fs->umask;
> +	error = vfs_mkdir(nd.dentry->d_inode, dentry, mode);
> +	dput(dentry);
> +out_unlock:
>  	mutex_unlock(&nd.dentry->d_inode->i_mutex);
>  	path_release(&nd);
>  out:
> _
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux