Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1555184rdb; Sun, 8 Oct 2023 13:26:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtswkxgQBz0bzNk1X0LWsAKC4+2aQ/yonCeev48ZD8IGHLi4n1h3qn717h9qYw+Ee2+/Fe X-Received: by 2002:a05:6a00:1ad1:b0:68f:d44c:22f8 with SMTP id f17-20020a056a001ad100b0068fd44c22f8mr14322480pfv.1.1696796818585; Sun, 08 Oct 2023 13:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696796818; cv=none; d=google.com; s=arc-20160816; b=L906cm1qz7EkAFg56cnkTzkJfnTrjAA1sCQekQ7AqTQnvSzFOqGzRCrYvvx6ZplMlT WmftnPcU90pHcshG00k1Nz91y0w5eEyPAbd/VFxcVtaWkq0d0QEPGxBXfM22XSkcKfLG xy6umo5WuBHVjviq9dknb4My4lVjf7uiOX8IuHAWzvKMDczZWtOWCg5+kkYlN7JbEe0q AAVChcIRFX7zUsJTNyjQVSgyVGxlVlXlrntnmN8Yv7P8XQA8olAClyMgOvRsyVQE0a4s dDYhekOSVaxSKDOa9w4v1NJYRD987aQdwzIcNqI5xd/DntSYupgF9GwnTpPruBDjkQ23 +HSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:references :in-reply-to:mime-version:dkim-signature; bh=8zBwTiFmOyiSrWi8kowYs1L9nr5J7WpIdPVf6xKDyZ4=; fh=CvGTVHTItarWSB1pDUdXx2eV0AZbtMxDLMKyNzLxh2s=; b=Id5BH0fUGokJy2dBMasn2UkdN87DCyXrfr3eBOSXRn7bjCtPaG6+5mpjKO7cfoU+ss L6OZDF6Z8BBIvQMeN+4QxOgR/r1LeNhswvzbyRWPDrGVmL4GjWUtm+JXoQYGYFqH+PZ+ gHp8qI6770+mc9/BILTRbhmx8WD7gg0QQuKIFlok5tuyIIN0Ixt7YygI88t1qMAhkVCF vIndK0+5Aum6597r/9E+KzxpkwhkdqYCxWUvoidiRYtdaRFRMI6zopZM/snzZNw76CS3 f4yYxU/iVx02z1BI1TOv2L3b3doYtJxqkj0Bh/gPxQjhvuCByt7E0fqLhp/6pPBhYXEQ bBmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NHnqGpKW; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id t11-20020a056a0021cb00b00696f1c14972si6134982pfj.208.2023.10.08.13.26.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 13:26:58 -0700 (PDT) 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=@gmail.com header.s=20230601 header.b=NHnqGpKW; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AC8E780AEB16; Sun, 8 Oct 2023 13:26:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232503AbjJHU0o (ORCPT + 99 others); Sun, 8 Oct 2023 16:26:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbjJHU0n (ORCPT ); Sun, 8 Oct 2023 16:26:43 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E65899; Sun, 8 Oct 2023 13:26:42 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3afc38cbdbcso1653915b6e.1; Sun, 08 Oct 2023 13:26:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696796801; x=1697401601; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8zBwTiFmOyiSrWi8kowYs1L9nr5J7WpIdPVf6xKDyZ4=; b=NHnqGpKWXNiRHupEUUfjKmR7aKh0g76MHR9paddHRiqOyx9aEa9N9U9cOAT/Y531eL Yuo/8KsqGwKOf+IG2tbwSN6CzBylUtyRwI1RJxt0hagZip7wMRzTEyFugo/AaYyNruIr IF6ArUqKPnIXcWETL4qm4KhwTqV6rY5AcT832w/yaJQ1q3an3wGi2/HMGnyQIoDPPovy 9Vu/B8uGT8+qVt7RsvuH+s7PtVs1N8jGkrg/Ea9UjvtwI+K7eBLVzp4wT4wuJIL9RWYz om6OvXBZjpb7a+R4gv6EuHokKPYv0sCCQAQ4aNr5N+raBY8dxIpUchMSMmbw90z3GXIF 3wzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696796801; x=1697401601; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8zBwTiFmOyiSrWi8kowYs1L9nr5J7WpIdPVf6xKDyZ4=; b=NFNgaoHicAcbnrvhgzP4XBb1ObKz007XTHdcmLERxDre228hjht0fUgr5Op0yQnXqz vKeb6cEW93EC5uCBkuEyqDL+R8XXSFlB2hoA9lkHqN9L51pacvAu1pN2AGyI5GdK0sSs e4ST2gYR3IAWkpps9lXfzhkK8UtgaKZY/oGgXJgSnVTbaVtxz39pmfGd413MbxAv9E+p it46hlDaMLRfyrqicX8HFA0VgXThCVYV4nakWFoPOU2Xu0Z6/02L/gL9sPOSz5+4nPu/ qMNw7Sbgzm0SvJeEsYIlyblizeq6gK3fRORSzyJSONCkM8F1zWNdqkPzPu8DFwmtgPA5 c9Gg== X-Gm-Message-State: AOJu0YzoqwzIsbNu6OzlbooOqRNtkc/2pJzX8m7KBsX+DoOLstA9Cfdd xb2svr7lXM4W+5H/YCCioKJOEfevQFS/rd6NhbAFGP+U X-Received: by 2002:a05:6808:aaa:b0:3a7:e779:7fc1 with SMTP id r10-20020a0568080aaa00b003a7e7797fc1mr4913920oij.7.1696796801341; Sun, 08 Oct 2023 13:26:41 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:5786:0:b0:4f0:1250:dd51 with HTTP; Sun, 8 Oct 2023 13:26:40 -0700 (PDT) In-Reply-To: <20231007203543.1377452-6-willy@infradead.org> References: <20231007203543.1377452-1-willy@infradead.org> <20231007203543.1377452-6-willy@infradead.org> From: Mateusz Guzik Date: Sun, 8 Oct 2023 22:26:40 +0200 Message-ID: Subject: Re: [PATCH v2 5/5] fs: Add inode_assert_locked() and inode_assert_locked_excl() To: "Matthew Wilcox (Oracle)" Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Chandan Babu R , "Darrick J . Wong" , linux-xfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 08 Oct 2023 13:26:57 -0700 (PDT) On 10/7/23, Matthew Wilcox (Oracle) wrote: > +static inline void inode_assert_locked_excl(const struct inode *inode) > +{ > + rwsem_assert_held_write(&inode->i_rwsem); > +} > + > static inline void inode_lock_nested(struct inode *inode, unsigned > subclass) > { > down_write_nested(&inode->i_rwsem, subclass); Why "excl" instead of "write"? Apart from looking weird, it is inconsistent with "prior art" in the file: i_mmap_assert_write_locked. -- Mateusz Guzik