Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5878009rwb; Tue, 22 Nov 2022 06:09:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf5HXpfHnXxmaw1GaI+EdWLHv+j26H6wyTmsY8fQBSHW1r7QefugyP/PqWtZ3Z9m9zl8d8oR X-Received: by 2002:a17:902:f801:b0:186:c589:9ed3 with SMTP id ix1-20020a170902f80100b00186c5899ed3mr5329818plb.52.1669126175489; Tue, 22 Nov 2022 06:09:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669126175; cv=none; d=google.com; s=arc-20160816; b=XBU+WfgPuJKhm42OFhOrDw8aCpf72O5EYyKnZQUbFmYN7l9MXiYJlHWgwOFfTgRNw6 AN/WD5GvoHLZk4+f/Evezq5xsDqXqArtSINxpPXTqkCs+g9htqrjv9YlKf+r7rJxZCKw nS2f/ywvD/8WggnoWhGfFkXpUuIo099M3hvT7Ygh/EO3S+C3TwLGZUdeFqMXRb/W8vPo LtTqpVbUn4iEFsZqpAOghBw6/G13QmuCkhh3kMQwskIC4xWw2jZNdyzl8x+g1BSwKkXI Xey2xWSfAlNjG5jLHKRoX5h4TIrT8DkvKWL7ANaoerVKRXq0I6C2FkGkdVW0q6TXsBFC EKrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Oz/x0hYzIKEhbV26HZwpXUkevVwyn0i3SBVcDpOX/FE=; b=f0TmuPwyi9hpwMm+ocLculyxnQezJ7GzKmpShOB+mByATcj9kABaw7GZdJyd71uAqh 1Wu8/ATmyu4CzloQV3iUsbB2fjUECoClXZuqW/LB/758o3qx4UAePNX6LVqX4u2v2oT0 3D7dJgYFyDQS3V/608/Kj8vSg1aoNZ3ltK5RDW4ynJy/Mh1XC3UsZxu4G4M4jRper+gB /xw8Dxu5U11Qmt7rrWjo95qzblVeYusdVLBgnRLvD2mpQHXcx81G/Fo/Luv6+BCNcRvH WQbjNoMhe8QZHWcsvHjrWrJodPMQhlxZKCQZJfx7MmxK/KD5An33D4fGV/ie3FhoTsRQ 2Rvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linbit-com.20210112.gappssmtp.com header.s=20210112 header.b=PKJAOS7u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p68-20020a622947000000b00558991a667esi12813252pfp.359.2022.11.22.06.09.22; Tue, 22 Nov 2022 06:09:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linbit-com.20210112.gappssmtp.com header.s=20210112 header.b=PKJAOS7u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233761AbiKVNnX (ORCPT + 90 others); Tue, 22 Nov 2022 08:43:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232384AbiKVNnO (ORCPT ); Tue, 22 Nov 2022 08:43:14 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AA3117AA2 for ; Tue, 22 Nov 2022 05:43:13 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id i12so20910436wrb.0 for ; Tue, 22 Nov 2022 05:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linbit-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Oz/x0hYzIKEhbV26HZwpXUkevVwyn0i3SBVcDpOX/FE=; b=PKJAOS7uyhQ4o6WULep7fOMCwPNev5tDMobcqb9XpkwRRaJ7PGELHvJLP+rH5JjuW5 Y0dUKeO48GiX7GSJrO0t61xtMV7JoebKt2ibAOeZvfqoy8Y6f+8QSzbanceeMO6t5JQ7 flG9zUAMWUCpUJDrsORvC1GFErL04yHK9KLbYcdkaaxa2h+iEGLZqxbT6ZuVAqtaC7DS ZdmSBH4NJP7JOa5Y0jOD6YfTeayHMYFY0pVR/mBUofyPNmV1QHbYcg/Xb96m041D3VDx QtmENcDGrWtvvCqIn3EWzXLoSO328nrTEGpsMSnFQTHUA3UoskAOMp3ANYaR0nCTuRxn KFnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Oz/x0hYzIKEhbV26HZwpXUkevVwyn0i3SBVcDpOX/FE=; b=OObzoZJsLp7RT6u6NAAM8nIdYvjCVQy5+VRrPIWAqq17veDJH9D42h1qwQgkkW41w0 friS10ByyzvFm9A0R/dJl2MoiW5dMM4mAxeDCniZuAY/WIhQhoYd3rLzL+rjcBQE3oV/ fCfHsxWZwRy3oRJafvT2+jb+ifn49PiIQtIpmgAa2TV/V6adfqu2VIpJQef4YXgyDX7s uFr4748SdW3T4junDNDlADrA22lxTytMNhkSWwVJC5TcZ7Wndb5A2KAoEaM79P1pn0R2 g1oldOAnZbzKgWygeRV7vGVVhpEKkCeyptmi0b1QmA2SJwJt0GhystsvRHxHhTTsfyEL FBUA== X-Gm-Message-State: ANoB5pmWlCSnE1rXq0uu/ZZ4ZFp2TxGkySH77pWdS1xGnJw49cDc4v6j PAprntbemm+tvurzfVXf8E2SEw== X-Received: by 2002:a5d:56d2:0:b0:236:cdf8:1e3f with SMTP id m18-20020a5d56d2000000b00236cdf81e3fmr7149354wrw.80.1669124593252; Tue, 22 Nov 2022 05:43:13 -0800 (PST) Received: from localhost.localdomain (h082218028181.host.wavenet.at. [82.218.28.181]) by smtp.gmail.com with ESMTPSA id p6-20020a1c5446000000b003b47e75b401sm21437729wmi.37.2022.11.22.05.43.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 05:43:12 -0800 (PST) From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= To: Jens Axboe Cc: drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org, Lars Ellenberg , Philipp Reisner , linux-block@vger.kernel.org, =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= Subject: [PATCH 2/4] lru_cache: remove compiled out code Date: Tue, 22 Nov 2022 14:42:59 +0100 Message-Id: <20221122134301.69258-3-christoph.boehmwalder@linbit.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221122134301.69258-1-christoph.boehmwalder@linbit.com> References: <20221122134301.69258-1-christoph.boehmwalder@linbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Christoph Böhmwalder --- lib/lru_cache.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/lru_cache.c b/lib/lru_cache.c index fec899386238..5dd5e4c00a23 100644 --- a/lib/lru_cache.c +++ b/lib/lru_cache.c @@ -60,17 +60,6 @@ int lc_try_lock(struct lru_cache *lc) } while (unlikely (val == LC_PARANOIA)); /* Spin until no-one is inside a PARANOIA_ENTRY()/RETURN() section. */ return 0 == val; -#if 0 - /* Alternative approach, spin in case someone enters or leaves a - * PARANOIA_ENTRY()/RETURN() section. */ - unsigned long old, new, val; - do { - old = lc->flags & LC_PARANOIA; - new = old | LC_LOCKED; - val = cmpxchg(&lc->flags, old, new); - } while (unlikely (val == (old ^ LC_PARANOIA))); - return old == val; -#endif } /** -- 2.38.1