Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2067492imw; Sun, 17 Jul 2022 00:03:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s/84NfOGe0bQ9xEwqr/ZoXH/kfTn0LFYKw9ktu4m3el20nGLh9HvzlV+bVmJqg/zp6/PIw X-Received: by 2002:a17:90b:4cd0:b0:1f0:e7a5:a0ed with SMTP id nd16-20020a17090b4cd000b001f0e7a5a0edmr16399644pjb.182.1658041404067; Sun, 17 Jul 2022 00:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658041404; cv=none; d=google.com; s=arc-20160816; b=oBYThOAvXGJkXViyEl4xjBqt1AE7qRdzHllNQ9VcbfmXxUpbozH87efX+mN1hWAyjc K72Zy7IzlAcjypjyL++pndXkapFKcxNo+cqMNxM8S7scDcV8+hXVVjgNloIsePhQqiQw ZjTrlkHvzAAHE29ay+ek8j+STGO0yhCKCNTAYbvtvV+5+rbfbmer6Aj0Aq2igaHYzOsw wZR9FdQH9PX95XfS1Rik32ToGyH224v7w5LXCq9HN/8skSkMstgh3fGrT9MQZNO2wDvm Kv1xSYkhILmzwMT3/c9ejeFINK6vGPdjg+4p7v8sQjqIsWEiicT4vfN8b3qvFSjDyok5 nV0Q== 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=X4YZxvL1EUK5zhn+ks8Yss/ZUVWfxwbXjHz41gAwFVw=; b=P5pz++GPiwryA0/X7TqfhVCiriDlexBp09gu8hL5uVvAT6fiV71AA4v0KpVgxzffjV audXdtviwZgMmQcrPoeHPQbSo467ILNjQ5LGcqq57Tw5IvdutiJsbHcKya1vV3OGlxF4 bbDBMUdAOQpSLdzW17EOOu1+qwtAyQkxdYCuWDmLq4HvSObIKuAyHrQx4eg0mmzfneM9 +QoFr+FSP86hL4qtHonHUfTY3jhINvURgfhMOnXtKLnpNZ/7q5S97mAIjh7+MkZccoqS gwMtEDxz3yQzGf9pNSMqMhFBl0GdTgdnfPzkoagmoT9yrBImvQSnsume3gk9PEIBVz4j mqIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=JX8CEv3Q; 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 y19-20020aa79af3000000b0052aeaff99efsi10038734pfp.39.2022.07.17.00.03.09; Sun, 17 Jul 2022 00:03:24 -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=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=JX8CEv3Q; 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 S232662AbiGQGzk (ORCPT + 99 others); Sun, 17 Jul 2022 02:55:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231543AbiGQGzj (ORCPT ); Sun, 17 Jul 2022 02:55:39 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCDB81705E for ; Sat, 16 Jul 2022 23:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=X4YZxvL1EUK5zhn+ks8Yss/ZUVWfxwbXjHz41gAwFVw=; b=JX8CEv3QH/31axHpg2Wm9uMOla FHVr5hLJ6aBBuPRYA0tMoC3JboIa0n7Am8wYtpolZ28OEyc1+FP+vSZgixrJC1z9V7uAF7VP65Nqn 6oBkQmkl8WCnf/HCW9aagifKhsFRxcmMwY/qVtjRyxAaVP52XSWpGzKuPOiDo9dS2IafW2nH0hPz4 WrCqRJpXQWtkpwv925R6W1McIWExRNgrysnz4IIXAk//Q6Sa1GbA3yO5r7RkwCe8OO2ogrI5h8VDb gdCGUlF5CPaV1q0E2E6dCiUIRZlnfwBqYC721FOnGzRe/7O/gQhyq7vNAWXddShgxx0Uz6KDFr3Y5 H+GpUeKQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCyBU-005PCY-Gr; Sun, 17 Jul 2022 06:55:20 +0000 Date: Sat, 16 Jul 2022 23:55:20 -0700 From: Christoph Hellwig To: "Fabio M. De Francesco" Cc: Jaegeuk Kim , Chao Yu , Nick Terrell , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Ira Weiny Subject: Re: [PATCH] f2fs: Use memcpy_page() in f2fs_copy_page() Message-ID: References: <20220716204353.22049-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220716204353.22049-1-fmdefrancesco@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE 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 On Sat, Jul 16, 2022 at 10:43:53PM +0200, Fabio M. De Francesco wrote: > static inline void f2fs_copy_page(struct page *src, struct page *dst) > { > - char *src_kaddr = kmap(src); > - char *dst_kaddr = kmap(dst); > > - memcpy(dst_kaddr, src_kaddr, PAGE_SIZE); > - kunmap(dst); > - kunmap(src); > + memcpy_page(dst, 0, src, 0, PAGE_SIZE); Please remove f2fs_copy_page entirely and open code this in the only caller.