From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26BA5C11F66 for ; Tue, 13 Jul 2021 05:53:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B9D66128B for ; Tue, 13 Jul 2021 05:53:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233305AbhGMFzy (ORCPT ); Tue, 13 Jul 2021 01:55:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231793AbhGMFzl (ORCPT ); Tue, 13 Jul 2021 01:55:41 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62D40C0613DD for ; Mon, 12 Jul 2021 22:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=d8q66gZVOpTmMdIc6dC+FZOKYvaRSFF6AtytyOW/st0=; b=jIxUPdAEFPmCu55gfoYLZDhxkp /d9LbXp8yp6IYRhraQRpyhV+vKVymM35vehxoN+ZyuSAi+PaBSO19h4JulUBCkB6R1PNaGWdkpQAj JV1s3FuKQ7Cadgdkq38+iecc869DxbHovvRI+tW7UO1TBUZppiXg05m2vDe6NLXTLB584kiDUoSBM rEE+Kaf5MsYfqo1qE3puB+T9FZ3jO0OVbMyZdV5Z0CgfFrBMdtrsdHELacHWd+L7K1G0SVigXj9xj Q1V5El41xtQttd1+KU5psKdd2V2l+wfSuWrkqhitRYXiIRpbZ42eCsV7TuRhKx1O4mMkr52VCeJWR ZcuBlXkw==; Received: from [2001:4bb8:184:8b7c:e5e6:2d8f:6506:596e] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3BLU-000mbL-QU; Tue, 13 Jul 2021 05:52:42 +0000 From: Christoph Hellwig To: Andrew Morton Cc: Ira Weiny , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Chaitanya Kulkarni Subject: [PATCH 2/2] mm: use kmap_local_page in memzero_page Date: Tue, 13 Jul 2021 07:52:31 +0200 Message-Id: <20210713055231.137602-3-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210713055231.137602-1-hch@lst.de> References: <20210713055231.137602-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The commit message introducing the global memzero_page explicitly mentions switching to kmap_local_page in the commit log but doesn't actually do that. Fixes: 28961998f858 ("iov_iter: lift memzero_page() to highmem.h") Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Ira Weiny --- include/linux/highmem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 8e7e50a53a12..d9a606a9fc64 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -324,10 +324,10 @@ static inline void memcpy_to_page(struct page *page, size_t offset, static inline void memzero_page(struct page *page, size_t offset, size_t len) { - char *addr = kmap_atomic(page); + char *addr = kmap_local_page(page); memset(addr + offset, 0, len); flush_dcache_page(page); - kunmap_atomic(addr); + kunmap_local(addr); } #endif /* _LINUX_HIGHMEM_H */ -- 2.30.2