From patchwork Wed Nov 8 11:41:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 162993 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp852394vqo; Wed, 8 Nov 2023 03:42:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQLT1rT7+4USJVkrU1zZvddqPZpydsXh8GYOM6m37+nNig/qKy+aKLPilDkOFEhSgOCwuM X-Received: by 2002:a05:6358:9997:b0:168:e01a:2002 with SMTP id j23-20020a056358999700b00168e01a2002mr1477050rwb.10.1699443747517; Wed, 08 Nov 2023 03:42:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699443747; cv=none; d=google.com; s=arc-20160816; b=HHezjGboWMwTixHP8I6XHnXOFtVtS9Jz5tyJJYBtbJEliQE8DFf47ZyoWDDg4rO7ir rPwrC6h+ouepqjKfHtGKGgoLWLhFMkuYnCVZFFyooT9X1mD3FfITw4QqkGG0gHgtoMYg pxfjcj5JXTBTV6jJyDzqQA4YEAGvPZmzgF7ecwv2esUHbrIcFJNLvLGSHePBrJvro5fV aRfNoC3jSCMAaXfSvk+JmgqhdNTIT+zMBgNSsdkGe3CDGHqHWeTYdtDZSIk92l3pP48k RkKBEX7qOjuZHuKlIaq6xjY3tRp+AiPc0ZeU2lFRDmYNurwzxj1IPHEuvFtp+TrtdUAG RlNg== 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=bmLEr1pWb19NVnljsUvllcFFWGCCprF2QCo+mitQriY=; fh=5BNCsxUaCbXxQyErjIZbPcQuTHGbSSAM8L1cPXK4Rgk=; b=xHRsNW+gb6WPLLZo3Vr6CaGuCy0MRUM8NM5FkF9kSujb5AcggH0l2ePrm8JYmmryKs RT7jhVBT2DgZJ+A28+Q887/SlKlHOIsdCKRqDW8B838Kc1yV1zViJ93xhgmoWLoXdLkm 0ik07uo2BgUFybK/gzMmuUr1F7gXdWO3vKBhOKwiYxEOGcSooyilAfbNkCvK5yMHL3JQ vaYA6Lo3HJ5hgLRrirI/hjrl4V12RxHYVNl+/Oa1DGC+3uFOJihax3WKV1wGCUaMDWru xBWLXPbCKTwMn2JsNL+YElEPy0mcbBBmqDPS8csGB2tv/4yl8lLJ43hU1HazrD58E2Jb RmRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=imExegtK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id r7-20020a63e507000000b005abe19be7e9si4441088pgh.543.2023.11.08.03.42.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 03:42:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=imExegtK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9DDD781BEEBF; Wed, 8 Nov 2023 03:41:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231611AbjKHLld (ORCPT + 32 others); Wed, 8 Nov 2023 06:41:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229924AbjKHLlc (ORCPT ); Wed, 8 Nov 2023 06:41:32 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58A5C1A5; Wed, 8 Nov 2023 03:41:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=bmLEr1pWb19NVnljsUvllcFFWGCCprF2QCo+mitQriY=; t=1699443690; x=1700653290; b=imExegtKaubsD2HuITWfhDle5a+vz34HZTTr8YXUHPvHmfKWNqbcBkCQ4yjrnn5nNz7URZC+C+C lYrvFj6PfwxqIJdrT+I0FN9Pdmqj33LGOhuha+68ClzuCt3xx6jdBvD4cPpeg8Zfy+JceoWiDcbWP GSMpbHPHhSR1iQpgx09QB1NbiTCKXrZbAyFDwH47kmmS4zJNVyDTNHw1MJWl7KjuUXeLDg355p1zW DDmmRPKuhjSq8DvieSn7BdwsfuOTj3bncqEvARlG/msyZSoEdli4khNFN6TKBLhSsSP8WgI0aQ0ri Q09XHCcZ/OiQsCadj90pYwrRYb4gOLWwF5vw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1r0gw2-00000000Trk-2CuE; Wed, 08 Nov 2023 12:41:26 +0100 From: Johannes Berg To: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Will Deacon , Johannes Berg , Davidlohr Bueso Subject: [PATCH] Documentation: locking: mutex-design: fix atomic_dec_and_mutex_lock() Date: Wed, 8 Nov 2023 12:41:24 +0100 Message-ID: <20231108124123.51c4a7339b7b.Id71e81d75d102fff30d5cd33e39d27caefbf83b7@changeid> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 08 Nov 2023 03:41:45 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781995927099455223 X-GMAIL-MSGID: 1781995927099455223 From: Johannes Berg Since atomic_dec_and_mutex_lock() uses mutex_lock() it is indeed not interruptible. Fix the documentation. Cc: Davidlohr Bueso Fixes: 9161f5409798 ("locking/mutexes: Documentation update/rewrite") Signed-off-by: Johannes Berg --- Documentation/locking/mutex-design.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/locking/mutex-design.rst b/Documentation/locking/mutex-design.rst index 78540cd7f54b..9d75661a60fc 100644 --- a/Documentation/locking/mutex-design.rst +++ b/Documentation/locking/mutex-design.rst @@ -124,7 +124,7 @@ Acquire the mutex, interruptible:: unsigned int subclass); int mutex_lock_interruptible(struct mutex *lock); -Acquire the mutex, interruptible, if dec to 0:: +Acquire the mutex, uninterruptible, if dec to 0:: int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);