public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Jan Kara <jack@suse.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: Remove duplicate jumps to the same label
Date: Wed, 15 Jul 2015 07:16:59 -0400	[thread overview]
Message-ID: <20150715111658.GB60463@bfoster.bfoster> (raw)
In-Reply-To: <1436950975-5004-1-git-send-email-jack@suse.com>

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@suse.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  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@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2015-07-15 11:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15  9:02 [PATCH] xfs: Remove duplicate jumps to the same label Jan Kara
2015-07-15 11:16 ` Brian Foster [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150715111658.GB60463@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=jack@suse.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox