From patchwork Wed Oct 22 09:15:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 401957 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id AAEE4140080 for ; Wed, 22 Oct 2014 20:15:10 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754369AbaJVJPJ (ORCPT ); Wed, 22 Oct 2014 05:15:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35301 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751675AbaJVJPH (ORCPT ); Wed, 22 Oct 2014 05:15:07 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 647CBAC09; Wed, 22 Oct 2014 09:15:06 +0000 (UTC) Received: by quack.suse.cz (Postfix, from userid 1000) id 0D6B381C69; Wed, 22 Oct 2014 11:15:06 +0200 (CEST) From: Jan Kara To: Ted Tso Cc: linux-ext4@vger.kernel.org, Jan Kara Subject: [PATCH] ext4: Remove never taken branch from ext4_ext_shift_path_extents() Date: Wed, 22 Oct 2014 11:15:04 +0200 Message-Id: <1413969304-2842-1-git-send-email-jack@suse.cz> X-Mailer: git-send-email 1.8.1.4 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org path[depth].p_hdr can never be NULL for a path passed to us (and even if it could, EXT_LAST_EXTENT() would make something != NULL from it). So just remove the branch. Coverity-id: 1196498 Signed-off-by: Jan Kara --- fs/ext4/extents.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 0b16fb4c06d3..31cd9b5c6419 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -5239,8 +5239,6 @@ ext4_ext_shift_path_extents(struct ext4_ext_path *path, ext4_lblk_t shift, return -EIO; ex_last = EXT_LAST_EXTENT(path[depth].p_hdr); - if (!ex_last) - return -EIO; err = ext4_access_path(handle, inode, path + depth); if (err)