diff mbox

xfs: remove pointless error goto in xfs_bmap_remap_alloc

Message ID 3f9689e1-3e1a-c874-f6ae-88ac40f9cde1@redhat.com (mailing list archive)
State Accepted
Headers show

Commit Message

Eric Sandeen Oct. 17, 2016, 1:54 p.m. UTC
The commit:

f65306ea xfs: map an inode's offset to an exact physical block

added a pointless error0: target; remove it.

Addresses-Coverity-Id: 1373865
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---


--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Darrick J. Wong Oct. 17, 2016, 9:36 p.m. UTC | #1
On Mon, Oct 17, 2016 at 08:54:25AM -0500, Eric Sandeen wrote:
> The commit:
> 
> f65306ea xfs: map an inode's offset to an exact physical block
> 
> added a pointless error0: target; remove it.
> 
> Addresses-Coverity-Id: 1373865
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

> ---
> 
> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> index c27344c..861cf8d 100644
> --- a/fs/xfs/libxfs/xfs_bmap.c
> +++ b/fs/xfs/libxfs/xfs_bmap.c
> @@ -3974,9 +3974,6 @@ xfs_bmap_remap_alloc(
>  	 * allocating, so skip that check by pretending to be freeing.
>  	 */
>  	error = xfs_alloc_fix_freelist(&args, XFS_ALLOC_FLAG_FREEING);
> -	if (error)
> -		goto error0;
> -error0:
>  	xfs_perag_put(args.pag);
>  	if (error)
>  		trace_xfs_bmap_remap_alloc_error(ap->ip, error, _RET_IP_);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index c27344c..861cf8d 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -3974,9 +3974,6 @@  xfs_bmap_remap_alloc(
 	 * allocating, so skip that check by pretending to be freeing.
 	 */
 	error = xfs_alloc_fix_freelist(&args, XFS_ALLOC_FLAG_FREEING);
-	if (error)
-		goto error0;
-error0:
 	xfs_perag_put(args.pag);
 	if (error)
 		trace_xfs_bmap_remap_alloc_error(ap->ip, error, _RET_IP_);