xfs
[Top] [All Lists]

Re: [PATCH] xfs: Remove duplicate jumps to the same label

To: Jan Kara <jack@xxxxxxxx>
Subject: Re: [PATCH] xfs: Remove duplicate jumps to the same label
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Wed, 15 Jul 2015 07:16:59 -0400
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1436950975-5004-1-git-send-email-jack@xxxxxxxx>
References: <1436950975-5004-1-git-send-email-jack@xxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Wed, Jul 15, 2015 at 11:02:55AM +0200, Jan Kara wrote:
> xfs_create() and xfs_create_tmpfile() have useless jumps to identical
> labels. Simplify them.
> 
> Signed-off-by: Jan Kara <jack@xxxxxxxx>
> ---

Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

>  fs/xfs/xfs_inode.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
> index 3da9f4da4f3d..d22a984d8470 100644
> --- a/fs/xfs/xfs_inode.c
> +++ b/fs/xfs/xfs_inode.c
> @@ -1175,11 +1175,8 @@ xfs_create(
>        */
>       error = xfs_dir_ialloc(&tp, dp, mode, is_dir ? 2 : 1, rdev,
>                              prid, resblks > 0, &ip, &committed);
> -     if (error) {
> -             if (error == -ENOSPC)
> -                     goto out_trans_cancel;
> +     if (error)
>               goto out_trans_cancel;
> -     }
>  
>       /*
>        * Now we join the directory inode to the transaction.  We do not do it
> @@ -1318,11 +1315,8 @@ xfs_create_tmpfile(
>  
>       error = xfs_dir_ialloc(&tp, dp, mode, 1, 0,
>                               prid, resblks > 0, &ip, NULL);
> -     if (error) {
> -             if (error == -ENOSPC)
> -                     goto out_trans_cancel;
> +     if (error)
>               goto out_trans_cancel;
> -     }
>  
>       if (mp->m_flags & XFS_MOUNT_WSYNC)
>               xfs_trans_set_sync(tp);
> -- 
> 2.1.4
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>