Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp832484rwb; Thu, 19 Jan 2023 03:21:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXtOQZ9w27fpp51+BPuEDQIWNOA+++ITIdTx6L1JPkeV8EYRIaV8h8oLsvTgJArwUdRZjSN2 X-Received: by 2002:a17:907:c29b:b0:870:6715:bc8c with SMTP id tk27-20020a170907c29b00b008706715bc8cmr6983655ejc.55.1674127271380; Thu, 19 Jan 2023 03:21:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674127271; cv=none; d=google.com; s=arc-20160816; b=nY0i1jdnJ0Tr7E/Wn8K3/s43Ma84mqrWCPrC9mC5XQE2yMDBLNB1c8vrx8ynzLZP5o 2ZN5DC69RNThEY0XVbHa2wIjPo8LdD+aS0d2NRrqrQ2k7T0eWmehfBHl4PBwRaLQ/wn5 2545/t3iuIY+paWJcmmWokupwq47c+IDPao7DK89dPLaImECxeqYdkWhuSbPVsRxTNjS MpARfzOjqxW1wCv2gn9AvfkWye462d80AKQVJtyj9B+DZZb76lDXkhsN20yOoELdJ7X2 3lNV3eXlGjiu5dLVSNgVQmelwtG39ku1xDi7YYgfXSxgF1ezsY6Un8PaIDq5Kw3GTVEp Z5HQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=i6i5x37mYZe3aOy5A75Nxb44pi0Ov9eivp98jLF4Pa0=; b=Bm9X1Qb99C77ynY6GziGpqKehjldHzADlroXQeN7a0sG5nHe5LY9fxMVIPt78G7qww +5bDTnW90LvONV/q0VctPCeGppR+M5DMQ46wDg9B68z/u4pDFGaWdi3Y3VtGcSbOLPWH P4nT+zT2UJeoTZKQ9ii6Ryak5FWNVsSPEVhQJgCBw+mKQV2htk1YDoxi54LxZP4Pqmnt qMw2tatl8uLC6mOV2dk+oORIAr4gbJpOym+eetBxnAZQzm0DZQYJR9VNwFSwpFaYuPOC 4LcWWq70DeQLhvZkFjhhmf+2zTzo8Uh6skM7a1xJ4m4+x0UDurheS3drA/E2Spc5MG46 dcvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZKCuIXK3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd6-20020a1709069b8600b008775fc7096esi5355870ejc.773.2023.01.19.03.21.00; Thu, 19 Jan 2023 03:21:11 -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=@gmail.com header.s=20210112 header.b=ZKCuIXK3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230026AbjASKzH (ORCPT + 44 others); Thu, 19 Jan 2023 05:55:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229989AbjASKzA (ORCPT ); Thu, 19 Jan 2023 05:55:00 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ABF54AA76; Thu, 19 Jan 2023 02:54:56 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id o20so2658933lfk.5; Thu, 19 Jan 2023 02:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=i6i5x37mYZe3aOy5A75Nxb44pi0Ov9eivp98jLF4Pa0=; b=ZKCuIXK3VdjwQ0/R04Tz2nTKeqnbhXdCn5a7oUUQGj70vaAlHMoZrYxBuv/AehWi0R Ws4aqhRr3FJhHiOkhSjp6uOtUWmKieUo5nc2YN66b+khDvWTIce6+bG+9JlS9H80H2Zk 5ElzJuwMWU3xCpYvi+DwyrgPR3PZG2scXssB3MlhsmIRhY5njkaTPmRFzmjlMTdc3Pk3 /XZF+mAuD5qQF4mShAXs3UxeQjYKeV8xH8sbo2MvP0L68ymQyWbsT/ORJhrlANzz6ngD 41rSlMxFy7gGF//qOMRMxmCTwHmH5zbYPqXwU/5igRewVmwiqYe8ynoJ97ah6iT5YYRX ZDog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=i6i5x37mYZe3aOy5A75Nxb44pi0Ov9eivp98jLF4Pa0=; b=lzynhWss1iuMpZ4ic5HDl7BrhBrcyqOJjy8netTb0eDIMf9bPcrf+jp5Tzs+zfeVJx hznTvdG0qewqMjc6DjPdB7Qh7WjcalyH4oeRe258M+ZrvcTGzuOLTweVwNJ7/JBXoplq HVRgO2E0oiFJ46m1wDRso1tbKWmQoVOBsm6wib9pY/4w6AfBYRZJN6tQIIng25TvfmBk TjWVM+N3nfOa2rln0q/pgsjRwVX2wChznxfn+dDNTlyIu7BVm6vD7pt8G10jCMLp1DBO pzhuUQwYiCQLQjNT3oM5uxIaa7TICfNGPmwbAvpM0eBBzuKkdAucgz3f9J3GeMjSGDQm hoqQ== X-Gm-Message-State: AFqh2kpT52cdcu1qwFxX2lw/xObeR9DDnYdY7mX/PGgHQ6ZgdQDcc5iO 9xxpH7vj6zn8wu52eaL82KfPgdnktp7ji17Y X-Received: by 2002:ac2:435a:0:b0:4d5:7fad:a042 with SMTP id o26-20020ac2435a000000b004d57fada042mr2311847lfl.41.1674125694887; Thu, 19 Jan 2023 02:54:54 -0800 (PST) Received: from mkor.rasu.local (95-37-60-162.dynamic.mts-nn.ru. [95.37.60.162]) by smtp.gmail.com with ESMTPSA id n22-20020a0565120ad600b004aac23e0dd6sm5878777lfu.29.2023.01.19.02.54.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 02:54:54 -0800 (PST) From: Maxim Korotkov To: Alexander Viro Cc: Maxim Korotkov , Jens Axboe , Tejun Heo , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH] writeback: fix call of incorrect macro Date: Thu, 19 Jan 2023 13:44:43 +0300 Message-Id: <20230119104443.3002-1-korotkov.maxim.s@gmail.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 the variable 'history' is of type u16, it may be an error that the hweight32 macro was used for it I guess macro hweight16 should be used Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 2a81490811d0 ("writeback: implement foreign cgroup inode detection") Signed-off-by: Maxim Korotkov --- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 6fba5a52127b..fc16123b2405 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -829,7 +829,7 @@ void wbc_detach_inode(struct writeback_control *wbc) * is okay. The main goal is avoiding keeping an inode on * the wrong wb for an extended period of time. */ - if (hweight32(history) > WB_FRN_HIST_THR_SLOTS) + if (hweight16(history) > WB_FRN_HIST_THR_SLOTS) inode_switch_wbs(inode, max_id); } -- 2.37.2