From patchwork Mon Oct 19 11:37:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 7435231 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AF2A69F36A for ; Mon, 19 Oct 2015 11:48:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA100206E0 for ; Mon, 19 Oct 2015 11:48:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 623A3206DF for ; Mon, 19 Oct 2015 11:48:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751107AbbJSLsD (ORCPT ); Mon, 19 Oct 2015 07:48:03 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:35786 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750840AbbJSLsC (ORCPT ); Mon, 19 Oct 2015 07:48:02 -0400 Received: by pasz6 with SMTP id z6so28755819pas.2 for ; Mon, 19 Oct 2015 04:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=veMpuPp///caC5ZBNzjgM+0NSUfVUScri9PPzy8b6iA=; b=OrXDyn3hl0yn0MrpYJS4ZxW8x/exG1YAqZuOCV/TfJIP/dMOTHK8TppxMWsobpRGdY KFBRxuo1RgKs3c9WLSdBunqas/iNaEtABQJXTmEg2b5ZNL5KCHftEaOp6AESUG2xguCE bLAgkJqrn0cfLrD0O89o9F0sFQG7Xks9DJJ7SM+de+FnmMqF3gfZrN6pT9c45y1kxXK0 ZElFl7nSjsLCPEgyg5fXy6fR3LBrJ6CUvU+U7kVFv8TUnl2xrlZ+irDmAY/Ix/0UpNO8 /bbQ1xh0E6y8thvaa59Mm20vRJ652Ln5NGu0rZk3pAT1T03MNa/q9zlqoJU0Mvv384Zl 0iZQ== X-Received: by 10.68.238.69 with SMTP id vi5mr34251134pbc.29.1445255281575; Mon, 19 Oct 2015 04:48:01 -0700 (PDT) Received: from localhost ([128.199.137.77]) by smtp.gmail.com with ESMTPSA id xu5sm36280786pab.12.2015.10.19.04.48.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 04:48:01 -0700 (PDT) From: Eryu Guan To: linux-btrfs@vger.kernel.org Cc: Eryu Guan Subject: [PATCH 08/10] btrfs-progs: remove identical branch in record_extent() Date: Mon, 19 Oct 2015 19:37:58 +0800 Message-Id: <1445254680-11102-9-git-send-email-guaneryu@gmail.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1445254680-11102-1-git-send-email-guaneryu@gmail.com> References: <1445254680-11102-1-git-send-email-guaneryu@gmail.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The same code is executed when the condition "ret" is true or false, because the code in the if-then branch and after the if statement is identical. Signed-off-by: Eryu Guan --- cmds-check.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmds-check.c b/cmds-check.c index 118a274..a459893 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -6310,8 +6310,6 @@ static int record_extent(struct btrfs_trans_handle *trans, "start %llu len %llu parent %llu root %llu\n", rec->start, rec->max_size, parent, tback->root); } - if (ret) - goto fail; fail: btrfs_release_path(path); return ret;