From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760250AbcBYMoK (ORCPT ); Thu, 25 Feb 2016 07:44:10 -0500 Received: from lists.s-osg.org ([54.187.51.154]:42583 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752279AbcBYMoI (ORCPT ); Thu, 25 Feb 2016 07:44:08 -0500 From: Luis de Bethencourt To: linux-kernel@vger.kernel.org Cc: xfs@oss.sgi.com, david@fromorbit.com, bfoster@redhat.com, sandeen@sandeen.net, namjae.jeon@samsung.com, cmaiolino@redhat.com, darrick.wong@oracle.com, billodo@redhat.com, Luis de Bethencourt Subject: [PATCH] xfs: remove impossible condition Date: Thu, 25 Feb 2016 12:43:57 +0000 Message-Id: <1456404237-18169-1-git-send-email-luisbg@osg.samsung.com> X-Mailer: git-send-email 2.5.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org bp_release is set to 0 just before the breakpoint of the for loop before the conditional check (in line 458). The other breakpoint is a goto that skips the dead code. Addresses-Coverity-Id: 102338 Signed-off-by: Luis de Bethencourt --- Hi, Thanks for reviewing this :) Luis fs/xfs/libxfs/xfs_bmap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 6a05166..1171795 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -477,10 +477,7 @@ xfs_bmap_check_leaf_extents( } block = XFS_BUF_TO_BLOCK(bp); } - if (bp_release) { - bp_release = 0; - xfs_trans_brelse(NULL, bp); - } + return; error0: -- 2.5.1