Re: [RFC][PATCH 11/27] sys_symlinkat() collapse one more if ()

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

 



On Wed, Jun 07, 2006 at 05:10:23PM -0700, Dave Hansen wrote:
> 
> Collapse another if() to make way for a new condition.
> 
> This patch should make no functional changes.

Acked-by: Herbert Poetzl <herbert@xxxxxxxxxxxx>

> Signed-off-by: Dave Hansen <haveblue@xxxxxxxxxx>
> ---
> 
>  lxc-dave/fs/namei.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff -puN fs/namei.c~elevate-writers-vfs_symlink-part2 fs/namei.c
> --- lxc/fs/namei.c~elevate-writers-vfs_symlink-part2	2006-06-07 16:53:18.000000000 -0700
> +++ lxc-dave/fs/namei.c	2006-06-07 16:53:18.000000000 -0700
> @@ -2186,10 +2186,12 @@ asmlinkage long sys_symlinkat(const char
>  		goto out;
>  	dentry = lookup_create(&nd, 0);
>  	error = PTR_ERR(dentry);
> -	if (!IS_ERR(dentry)) {
> -		error = vfs_symlink(nd.dentry->d_inode, dentry, from, S_IALLUGO);
> -		dput(dentry);
> -	}
> +	if (IS_ERR(dentry))
> +		goto out_unlock;
> +
> +	error = vfs_symlink(nd.dentry->d_inode, dentry, from, S_IALLUGO);
> +	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