Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp21369345rwd; Thu, 29 Jun 2023 15:14:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6zh2RQqwF0Q0l+43QsLp7I6oSdoPT53jAJ6LAPpDH+9lA8FzfbE301LBGtJc1oQaOwn6i0 X-Received: by 2002:a05:6870:1f07:b0:1b0:408a:1d14 with SMTP id pd7-20020a0568701f0700b001b0408a1d14mr1521381oab.44.1688076849381; Thu, 29 Jun 2023 15:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688076849; cv=none; d=google.com; s=arc-20160816; b=A4j90AGtg3mblAvCn0gLfWu/1cM9g3NHq3m0A+q1PJGyJb/rj7e7wVnBUAnDDiDxcK Th32GHzn843OKW4IyjPIlANFm56f27XcTnWU1JycxD1OT1pUgyKcMD5vO5skoayH2qDx Xch4msMiD8j9XWd7YEzEj4HJSN7N0lKFLkO5+q9jeRTV45bnuSQPd0VGZKGO6H9HVhHb 0u4zSXye7MTa5x8NEYqVlLdXMh6jBfb40UGNVy25biyY+fAfQdUiFx/+MEg1zlDn/F8j 2OZXuQe1WtUVfthT8DerNpnsqM/HGm1na6JAVc9FiQKVDC3CN1oB9YB951eNNpX5+U5v 9KOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Dn4FxUBt1nJ2/5Cw/yPMrck6RPvZ2RavcA0IvoH9SbU=; fh=2/OepbD16sII06AHmQTJgD7xcw2OMNoUEY9t7KuTeGw=; b=zgEB25dXuuKmdjUKuJub86Z7JZfwa3Ep5TwIW3mGn1snPa8c2HNrCrfTBHVSBirqlo joSECAae2Ig9HP+/3UyCWVDVOsUC/HtpH4lMo4O2pfqnkxIJcZjTQ2VKa6ltJY5OeKuF fa/0f83YZsNZBXrkxEVCAWJ+AgDrrQEGP5q7n1nKDWZUOfzABTHJYOzyPgdtjZLypIqi YnbWKs31BtVT/5qXwS8ETATSiyziV6YkmD7pR9OI3ifomjDIyuuiHOvmZ4htOP7ad9tt XAKbalXQtAh6VQaPM9CYOshVsF49eWyQF8dQiNvWcV33iJyTP1Pz5Z7mfiNsnc/auPKx M7jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=jROdF5sK; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j192-20020a638bc9000000b00542b1792242si11322780pge.720.2023.06.29.15.13.56; Thu, 29 Jun 2023 15:14:09 -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=fail header.i=@mailo.com header.s=mailo header.b=jROdF5sK; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232134AbjF2Vwn (ORCPT + 99 others); Thu, 29 Jun 2023 17:52:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232125AbjF2Vwl (ORCPT ); Thu, 29 Jun 2023 17:52:41 -0400 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB41D30C4 for ; Thu, 29 Jun 2023 14:52:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1688075556; bh=UA/oPXEOCkpLvdvEKZfva8LkSO3tk7fFipNWehdBuOA=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=jROdF5sKV/UphvUFU2txfGwyrTjsaRUbPT4TQa58ZW19BxibusSFDDztO1qgzlsyA YcyR1gW1BBlDJgqCWuGxBDr2NTTWyZzc2XsAmJG8/Le2odaW5y/ufJi8wq2+CGdl5Y f6AbJ5dIIJ7cUFUEqV8whZmHs2ch3/yWwjoVoT8E= Received: by b221-2.in.mailobj.net [192.168.90.22] with ESMTP via ip-20.mailobj.net [213.182.54.20] Thu, 29 Jun 2023 23:52:36 +0200 (CEST) X-EA-Auth: Rz1yyKWhBlZLKK+E7BgmFVdgRQu2DOQ6nBvjfd3qC+VEec0HVUJnMCWv71/GeS1XHqO4oOENrwt389pQ/71L0tyeKcGUbMkM Date: Fri, 30 Jun 2023 03:22:27 +0530 From: Deepak R Varma To: Bob Peterson , Andreas Gruenbacher , cluster-devel@redhat.com, linux-kernel@vger.kernel.org Cc: Ira Weiny , "Fabio M. De Francesco" , Sumitra Sharma , Deepak R Varma Subject: [PATCH v3 6/6] gfs2: Replace kmap_atomic() by kmap_local_page() in gfs2_write_buf_to_page Message-ID: <4bed561513ba76486ea3fc87f97e6c646f98cbe7.1688073459.git.drv@mailo.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 kmap_atomic() is deprecated in favor of kmap_local_{folio,page}(). Therefore, replace kmap_atomic() with kmap_local_page() in gfs2_write_buf_to_page(). kmap_atomic() disables page-faults and preemption (the latter only for !PREEMPT_RT kernels), However, the code within the mapping/un-mapping in gfs2_write_buf_to_page() does not depend on the above-mentioned side effects. Therefore, a mere replacement of the old API with the new one is all that is required (i.e., there is no need to explicitly add any calls to pagefault_disable() and/or preempt_disable()). Suggested-by: Fabio M. De Francesco Signed-off-by: Deepak R Varma --- Changes in v3: - Patch included in patch set Changes in v2: - None fs/gfs2/quota.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 386ca770ce2e..e5767133aeea 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -764,10 +764,10 @@ static int gfs2_write_buf_to_page(struct gfs2_inode *ip, unsigned long index, } /* Write to the page, now that we have setup the buffer(s) */ - kaddr = kmap_atomic(page); + kaddr = kmap_local_page(page); memcpy(kaddr + off, buf, bytes); flush_dcache_page(page); - kunmap_atomic(kaddr); + kunmap_local(kaddr); unlock_page(page); put_page(page); -- 2.34.1