From patchwork Mon Oct 17 14:40:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 220 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1487289wrs; Mon, 17 Oct 2022 07:42:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7SivYTXI0Bi41ySrOxw5uiMB2FSWn2Cp8+r6f5rj91CrBoF0tEyXCD8k4R0FQvW9j6ntVs X-Received: by 2002:a05:6402:1e8e:b0:45c:af84:63dd with SMTP id f14-20020a0564021e8e00b0045caf8463ddmr10663737edf.190.1666017732930; Mon, 17 Oct 2022 07:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666017732; cv=none; d=google.com; s=arc-20160816; b=jBG8cU82bAuCHkkm7QqLgiRK3PFpjCwmfCxS9MticnDirrDMb3nOybgb0A6TLPZoA4 PuzAjfLsbOSn9JSq6BAhr+R1OCfVuG5qZDjM5+3waLVKaKppKS//6JGnOJS3SrbMWvQy fnMEnjDtepXis+U9j7tfP7nEtwJ3TZuoLrR1ttRqJP513glmwHOHqH/sFG71LMsKYo5z YI7TB0NIdGLxGi1ppSZeo1Kj5JYkHzpgqojCyZwDhdwf/vci6yqTyoNA6y1mSEdD0hsy MQmud7b42oiW8cvVp3IWLUtJMLbVteausixlo+ZWwpps+uIWz2VLq/XLp2nG2wGO7xn9 Jg7w== 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=xsxaicTDlIagIqu6bJeoJSkHH1vSoDWoRrDEv5qAt/k=; b=eIshjqX0PBlxB2S9uReMbuEUBkm7/FFn7Ft5naRmknay/Gnob0g2pNqm93667OYwme ukAEcLkS8XedppoOmMmXMAozMa9sKkKSOdl5sFTbFHNz1c/7Li9skpdbh9qmXBdOxulm JnWCQJM6vF8tLDCMR05KoFkI/xNZQhDo98h9Hzf/NNliK76eHe+oTwhjnciuZn30D6Fq mQjajPRnhQeISgc/1AuBI9X+qLbNYe2iVZ13CEmPsN89Sgz+fRIjQy9vK32TF1sq8i7O lmdlrCNtkWB0GMs4+L3P9VDeugm/UvAJ6ZYI2nRYeCBLDUQu6z1IukOm7/p+yxVzFVM6 EqWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PXGk1RSf; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020a056402320800b0045ccd1715d5si9246734eda.435.2022.10.17.07.41.31; Mon, 17 Oct 2022 07:42:12 -0700 (PDT) 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=PXGk1RSf; 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 S230456AbiJQOlQ (ORCPT + 99 others); Mon, 17 Oct 2022 10:41:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbiJQOlO (ORCPT ); Mon, 17 Oct 2022 10:41:14 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F00A50184 for ; Mon, 17 Oct 2022 07:41:13 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id b2so25452095eja.6 for ; Mon, 17 Oct 2022 07:41:13 -0700 (PDT) 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=xsxaicTDlIagIqu6bJeoJSkHH1vSoDWoRrDEv5qAt/k=; b=PXGk1RSfUVoWkwBAodqyPkaLmLevIMz9ngvbTVhnnoMhW4dobMdeoNfE+gOOg1L97i lm003B2Myr2/bpeXwOy1qtVfNO81w2c1DPL7KdEKGOrsGffhPwOCX1gBgYnup0bABfAk GT4OsQCZp1iyhWJgl1zo4k1YzB+dxab1hQ0Ew+dUSxwA2w/krxy8S1gbtJ1jBE2ku9dh OlyffLZYB6s/Nw+pq5ybjLnW4zyJ6TeT9GXqUEVtaSdfRwIagd66I2HA8vx8XFrkIpNS 9ymKDHfFqY+vMH1xZlHixT3VaXgrpQDk1clkpS2w+mdjb5Dcc8Sz8lcdplIRj8+Q6SlZ U5Lw== 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=xsxaicTDlIagIqu6bJeoJSkHH1vSoDWoRrDEv5qAt/k=; b=V5QBLAsTdaueSGtlJxT+Qac4TLXdxKAFENP5OKfWBfn730wTewKjGzHzOmbDBJrZwR rVKBROc6yLvyOPAYDU/bvpyNv5f4YSVJPM5BlXHyWXgJYu+o8X3OqaEXq0DC0wLDUaX5 E4A+pHjAMaTW/Br33CAdlMXHuU0O4Jy+5FlvtJdJegA8FpsIBSLdd4YrTmQhexfOo24r LVm2/WKAywWIV8xNs/WiVNqPgw9FAI2AwW+oims9+Y83W5HninyIL5c5FnnZmwCCfA3s 3xHRKJDv7Zkjm4fCjC6fjZkRfDmM2TUTqJjKIdLyF0FljrUi0weVEtoZkB4jI4MlTFdi T7Vg== X-Gm-Message-State: ACrzQf26cQMxFtWPzwZwRITK5IGbtipefLaZR8QoZMJz88FpbYCvaGXi dI0ic8J/pOh6gOoo2ZF7knsT7vau/90+6Q== X-Received: by 2002:a17:907:724d:b0:78d:acf4:4c57 with SMTP id ds13-20020a170907724d00b0078dacf44c57mr8937248ejc.516.1666017671592; Mon, 17 Oct 2022 07:41:11 -0700 (PDT) Received: from localhost.localdomain ([46.248.82.114]) by smtp.gmail.com with ESMTPSA id dn2-20020a05640222e200b00459cf672a65sm7469144edb.71.2022.10.17.07.41.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 07:41:11 -0700 (PDT) From: Uros Bizjak To: linux-kernel@vger.kernel.org Cc: Uros Bizjak , "Eric W. Biederman" Subject: [PATCH RESEND 0/2] ucount: Fix and improve atomic_long_inc_below Date: Mon, 17 Oct 2022 16:40:47 +0200 Message-Id: <20221017144049.3404-1-ubizjak@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746946210197345341?= X-GMAIL-MSGID: =?utf-8?q?1746946210197345341?= The series fixes wrong argument type and improves atomic_long_inc_below by using atomic_long_try_cmpxchg instead of atomic_long_cmpxchg. Signed-off-by: Uros Bizjak Cc: "Eric W. Biederman" Uros Bizjak (2): ucount: Fix atomic_long_inc_below argument type ucount: Use atomic_long_try_cmpxchg in atomic_long_inc_below kernel/ucount.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)