Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5329295rwi; Mon, 17 Oct 2022 19:44:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5J/gEIUsM8nnb482X023bkaAGRJdAypxanfIazcZvlrMD4h9W8PKlABIAEmlkg3SEJuHdc X-Received: by 2002:a05:6402:254b:b0:45d:b117:90f0 with SMTP id l11-20020a056402254b00b0045db11790f0mr588818edb.57.1666061093976; Mon, 17 Oct 2022 19:44:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666061093; cv=none; d=google.com; s=arc-20160816; b=F6YcvjB7/IPWRuoSfjLgExArQQ3jvcA+YiNpm121XH3hCm3AK1cYQ9GIE6JM5ZCn7X 5QIRAyZ0ynBytvGpyxgyKZ0/uxOuSLo2pcIdRI6rTLWoWDdAGKRCLYQpxEmiIBR1Nes7 XTaU7RlgsFnmu6gNkTyx1e01IihEMYWrmz+1F1F5P18w1sQCkLHCyASw1czmPzOZYZhR DNJzqBp5cA0a0CLCHg6puEEf+7ZcTICA+L3oSKrgu3jjtCPZrZxjRWs/nZoh8BwjIV3l StWQ1VVmlfsyALf3ZtuOQ/R6KfNu4CGsNDVAy7059m2tuVlHb9zcixOaBs0lBA8imVeE dZag== 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 :user-agent:message-id:date:cc:to:from:subject; bh=4nrBpSrjFxVVQrr6Rcq6cGoUyWHN1YwsySqAclecVwg=; b=B8bb4m6FjyTC7G8Mk0GZyRTHkoC7dVuSym0Ov4HjHgfenrUe1zrNX/14BruCNrNjM1 5rKb8OzZlXsjd3/gAiCUinq9bBiqA38B5JMqRQIroPZ6eX9xYZuNW4eOIu0kpeueZ/q2 5q7tZ02GMLN8tK7tHNMlbMx9rN4zvyN9FdrnyFB94/gL/FAvTebd9QwxC7fFafDzUspl IYMdwDXvyk4opNbEPaNNnG3DkLUY3PW7WMDsZajpRIqtynu44boIR5SgkM4V3ZfdC+sg fcbtIq8pm/kKmsyNeuLLcoEaK/Slftsi21hfLfrHUTa5K+v/cE50Y9W1UwPOsZCiRTRM 1JTw== ARC-Authentication-Results: i=1; mx.google.com; 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 s14-20020a056402520e00b0045dbfc32399si2185650edd.552.2022.10.17.19.44.28; Mon, 17 Oct 2022 19:44:53 -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; 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 S230073AbiJRCco (ORCPT + 99 others); Mon, 17 Oct 2022 22:32:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbiJRCcm (ORCPT ); Mon, 17 Oct 2022 22:32:42 -0400 Received: from smtp01.aussiebb.com.au (smtp01.aussiebb.com.au [IPv6:2403:5800:3:25::1001]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B05AD4D810; Mon, 17 Oct 2022 19:32:41 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp01.aussiebb.com.au (Postfix) with ESMTP id B241B100633; Tue, 18 Oct 2022 13:32:38 +1100 (AEDT) X-Virus-Scanned: Debian amavisd-new at smtp01.aussiebb.com.au Received: from smtp01.aussiebb.com.au ([127.0.0.1]) by localhost (smtp01.aussiebb.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7WNB4p_yMR_I; Tue, 18 Oct 2022 13:32:38 +1100 (AEDT) Received: by smtp01.aussiebb.com.au (Postfix, from userid 116) id 9FE2610062E; Tue, 18 Oct 2022 13:32:38 +1100 (AEDT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 Received: from donald.themaw.net (180-150-90-198.b4965a.per.nbn.aussiebb.net [180.150.90.198]) by smtp01.aussiebb.com.au (Postfix) with ESMTP id 2285B1003AE; Tue, 18 Oct 2022 13:32:35 +1100 (AEDT) Subject: [PATCH 0/2] kernfs: remove i_lock usage that isn't needed From: Ian Kent To: Greg Kroah-Hartman , Tejun Heo Cc: Minchan Kim , Eric Sandeen , Al Viro , Rick Lindsley , David Howells , Miklos Szeredi , Carlos Maiolino , linux-fsdevel , Kernel Mailing List Date: Tue, 18 Oct 2022 10:32:34 +0800 Message-ID: <166606025456.13363.3829702374064563472.stgit@donald.themaw.net> User-Agent: StGit/1.4 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the patch series to change the global kernfs mutex to a read-write semaphore the inode i_lock is used in several functions. But after thinking about it the i_lock is in fact not needed. Signed-off-by: Ian Kent --- Ian Kent (2): kernfs: dont take i_lock on inode attr read kernfs: dont take i_lock on revalidate fs/kernfs/dir.c | 24 +++++++++++++++++------- fs/kernfs/inode.c | 4 ---- 2 files changed, 17 insertions(+), 11 deletions(-) -- Ian