Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3040216ybt; Mon, 22 Jun 2020 13:23:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdRltA8p1wLU1cMnPOjox+My9rxTCmG34QInKfWBYYfCE/mLjKK0rqWm+dltd6IvnQfK/d X-Received: by 2002:a17:906:6403:: with SMTP id d3mr16870929ejm.386.1592857394316; Mon, 22 Jun 2020 13:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592857394; cv=none; d=google.com; s=arc-20160816; b=Q78QgnwK+PYHmNqDSRnHer7fXtOJpnGByOloteva7KifoXKibJ5OivxE2m2gFChKDV OVfuVWhkzIpUt8sfPT5leldLJHq4XH89Pz4WRGXhVCfduuQw5keoeO139W+w5k/H2A7v 6OQUnOy6bfWfWf4zMEuPdmORAY34D7MiWiuGAILoE5Zh05BGv9+0eu3d3jpP+v4VcseU b4suVEWQC78ivcOjMP3Qmo2Xqxy6w1jJ2Absl0Y9BU7F8W+ZjB+iL42EvYC78iXyDTFu mbW/BYzIWpDXMixU8UqkFVzl32gNjzp0cP3wVf83Od7XykUKAr1eCPntfaurqMun/HZG 81Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=VNztvp0y9WnrV/6OJszLJ+zxeRefbXjStepSV3r3pcQ=; b=hkCe5Pfh28vxBR/1q+IYVmRWyF9dL0VA9bnDsmH8kIs+/NCwFlSyuZfJlbvNHCD1YW p8gmH9H6Q+pfWAUUPr27cokLCSPuNDCJSFGgdyLxBwkD7UxaCZCb9mjzAZRNgd8v7I8m nzl/WeyWYGQavH1ugSd7WTpbDhRabG4mRWEtiBWM+7tX1J23iTWDUbxilMO1pBK7WObE X08tN5S4QD/QyatKzxprvEZnVtGocvnU6M4r08/QKED9zTFWLFb2EyMLt2FqfJpIzyWB 6LhdF6dRhWAFu3iyx6c6WJIFeYgfxCKQAHClci9pI0zTPt3EwJKEVEKKDKsfKUMW/Ykp K2Uw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gl21si9019515ejb.739.2020.06.22.13.22.51; Mon, 22 Jun 2020 13:23:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728729AbgFVUSw (ORCPT + 99 others); Mon, 22 Jun 2020 16:18:52 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:41151 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728384AbgFVUSw (ORCPT ); Mon, 22 Jun 2020 16:18:52 -0400 Received: by mail-lj1-f195.google.com with SMTP id 9so20860992ljc.8; Mon, 22 Jun 2020 13:18:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VNztvp0y9WnrV/6OJszLJ+zxeRefbXjStepSV3r3pcQ=; b=VwyXMURRnPU3CnmdNrL1N2CI60QOhf/ozrl9KbaDdBA++w+NO5BkMgTrHRcL196tR/ eIelApMOP2UC91bTKyEWclWnbBNx2uYla2/VGf/pbHtAQqw5x595cRLba4omIxmoaKMS sKurEHe4istVAYHMAqXws5RLGD+XPdpl32iNSEDpgqA4dETCZO2nVbz7HMoxP0Ne/upU tYGvMC2EgeF2VZt+zcVRkSmkm4hSF2MxnHIHoO8vM01KwzlYVPM7AJNktJby91ohOd/9 3ij09hYQi7k1cH/TGsbF+10HOY2Yn23fblkQpldnS1xsc7P9auANJ12wK59Jy25501bh B9Yw== X-Gm-Message-State: AOAM533ouPHGni/fD0zvkGmx53fqqa44kT7SGEqxvrj4ZvasdzDNXt+f KOnBBDGiaJGGzTnWOsUIKRI= X-Received: by 2002:a2e:1508:: with SMTP id s8mr9011236ljd.52.1592857129320; Mon, 22 Jun 2020 13:18:49 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-38-130.ip.moscow.rt.ru. [37.110.38.130]) by smtp.googlemail.com with ESMTPSA id x11sm3678333lfq.23.2020.06.22.13.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 13:18:48 -0700 (PDT) From: Denis Efremov To: Chris Mason , Josef Bacik Cc: Denis Efremov , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] btrfs: tests: remove if duplicate in __check_free_space_extents() Date: Mon, 22 Jun 2020 23:18:41 +0300 Message-Id: <20200622201841.14619-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org num_extents is already checked in the next if condition and can be safely removed. Signed-off-by: Denis Efremov --- fs/btrfs/tests/free-space-tree-tests.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/tests/free-space-tree-tests.c b/fs/btrfs/tests/free-space-tree-tests.c index 914eea5ba6a7..2c783d2f5228 100644 --- a/fs/btrfs/tests/free-space-tree-tests.c +++ b/fs/btrfs/tests/free-space-tree-tests.c @@ -60,8 +60,6 @@ static int __check_free_space_extents(struct btrfs_trans_handle *trans, if (prev_bit == 0 && bit == 1) { extent_start = offset; } else if (prev_bit == 1 && bit == 0) { - if (i >= num_extents) - goto invalid; if (i >= num_extents || extent_start != extents[i].start || offset - extent_start != extents[i].length) -- 2.26.2