Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2033068pxu; Tue, 24 Nov 2020 15:20:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwk/hrj8EFe8ghSDR7kDH+x4uxR1lje1ckL/1okB9DOvOsUt5XDjNmGy/K7lHbTrc4h4y1N X-Received: by 2002:a17:906:491a:: with SMTP id b26mr715723ejq.385.1606260031649; Tue, 24 Nov 2020 15:20:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606260031; cv=none; d=google.com; s=arc-20160816; b=DIa0gIEgyHEDUQajWUcG6z6ryI+xTrrPdjBhb2M/oPWjor/EJVHE+08gEt3xTEX6bP EQD3FgusS4X0AIr6VuD01w52phaH9UnTA5IxYjV4r2gSLAy1iZY52c3Qotzk3rfIh2CD dfVCxurIkyqUO3Cm4EEI2iGdkYW/WWTASF/eBE0EZ4fSZK7s9U9YDshsYYmezgxGb0gB cMZyxEtrAOPxv0CvSYDL3JqdLsGnWr1l0vB/ET3fok/Hdv4wS5aRurNWHu6AyGnHHTPS f/VKOB6qkUX7LETYNqRDtsEmXZ0itIkAy1QfIMucC2sPAGKxUXq6/IoFj6ur3GJsE4VB df/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=f/VMAu5sMyVns5g9hftVtphPsKDoFIm9T6LExvfBeck=; b=kpZ0kF0suBh91BqCLyKLf95G/T+EzmSCsOaH+unWcU59PHCufFxws/kVEwWVi6kne+ P+ii351sFfpwrAdTWdIL4pkNdwHCVjNVRrhk7BruqIw84PMUQ+KMjJO2aW3PnwXhvlwo K11KvQ3eklW/nVxUQERQPc/cs6sLvKB32RsKtiGGk0POicrdQ8UqbR771ji7Kk5SE3Fw qYglSZW22RkBA7ce1/kGPSmcPcPA8bJvOcXEJY8lRcaENg3dO5eDIVHm5tk46c0Tu+6j K77hmhQR11muEOxs6rWunnwFA8TynR/emZeGPzuOfdNpzqi0mu9EEXXDM2c5wIZZXfRl f1PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=hHIHwWDZ; dkim=pass header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b="cET7Qk/8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si137946edj.239.2020.11.24.15.20.00; Tue, 24 Nov 2020 15:20:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=hHIHwWDZ; dkim=pass header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b="cET7Qk/8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730991AbgKXP3c (ORCPT + 99 others); Tue, 24 Nov 2020 10:29:32 -0500 Received: from pb-sasl-trial21.pobox.com ([173.228.157.51]:51152 "EHLO pb-sasl-trial21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728426AbgKXP3b (ORCPT ); Tue, 24 Nov 2020 10:29:31 -0500 X-Greylist: delayed 517 seconds by postgrey-1.27 at vger.kernel.org; Tue, 24 Nov 2020 10:29:30 EST Received: from pb-sasl-trial21.pobox.com (localhost.local [127.0.0.1]) by pb-sasl-trial21.pobox.com (Postfix) with ESMTP id 8CFFF1FB17; Tue, 24 Nov 2020 10:20:52 -0500 (EST) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sasl; bh=Jo23Bh/xtFFvRBkpZCyz3G4sDYI=; b=hHIHwW DZezDY0qZ0+Uw2Kc8MxaUAgJyp45FhjJ9GZV/SP20uSHayZYoh9nwzNPgiG/G/vS K4857Vcglaqe9ULYXyU5bcVutM84fKdKLmCdXYi9Axf6CNxgB2/kzzuIqhvoFOxH qdNWw+OZHTQcxz5/WlUliCbZXspYyFBwmmaag= Received: from pb-smtp20.sea.icgroup.com (pb-smtp20.pobox.com [10.110.30.20]) by pb-sasl-trial21.pobox.com (Postfix) with ESMTP id 6CABF1FB14; Tue, 24 Nov 2020 10:20:52 -0500 (EST) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fluxnic.net; h=date:from:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; s=2016-12.pbsmtp; bh=Mn7Qjd0RWtZW8tou1NMKSrUduDIuvsAZF25t7rjnrTc=; b=cET7Qk/8pfKrUGDHxfJjaXH3YszxaIRACnvB7bB/d4VvjFSEYF6TCaWQR5SFceEaWJ5RjBsU/BghjHWvs7bVyFlHN7YT46rBiG+xa278WNAbjNFog8ccuVy/P/felkrwGfRFvXwGSLDFUDnsieYBq2aI1oVy9CGS76f3C8U2MR4= Received: from yoda.home (unknown [24.203.50.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 594FD10FA12; Tue, 24 Nov 2020 10:20:49 -0500 (EST) (envelope-from nico@fluxnic.net) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id 876AD2DA0AC4; Tue, 24 Nov 2020 10:20:47 -0500 (EST) Date: Tue, 24 Nov 2020 10:20:47 -0500 (EST) From: Nicolas Pitre To: Ira Weiny cc: Andrew Morton , Thomas Gleixner , Dave Hansen , Matthew Wilcox , Christoph Hellwig , Dan Williams , Al Viro , Eric Biggers , Luis Chamberlain , Patrik Jakobsson , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Howells , Chris Mason , Josef Bacik , David Sterba , Steve French , Jaegeuk Kim , Chao Yu , "Martin K. Petersen" , Brian King , Greg Kroah-Hartman , Alexei Starovoitov , Daniel Borkmann , =?ISO-8859-15?Q?J=E9r=F4me_Glisse?= , Kirti Wankhede , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 12/17] fs/cramfs: Use memcpy_from_page() In-Reply-To: <20201124060755.1405602-13-ira.weiny@intel.com> Message-ID: References: <20201124060755.1405602-1-ira.weiny@intel.com> <20201124060755.1405602-13-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Pobox-Relay-ID: A1F9A662-2E68-11EB-8BBF-E43E2BB96649-78420484!pb-smtp20.pobox.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Nov 2020, ira.weiny@intel.com wrote: > From: Ira Weiny > > Remove open coded kmap/memcpy/kunmap and use mempcy_from_page() instead. > > Cc: Nicolas Pitre > Signed-off-by: Ira Weiny Acked-by: Nicolas Pitre > --- > fs/cramfs/inode.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c > index 4b90cfd1ec36..996a3a32a01f 100644 > --- a/fs/cramfs/inode.c > +++ b/fs/cramfs/inode.c > @@ -247,8 +247,7 @@ static void *cramfs_blkdev_read(struct super_block *sb, unsigned int offset, > struct page *page = pages[i]; > > if (page) { > - memcpy(data, kmap(page), PAGE_SIZE); > - kunmap(page); > + memcpy_from_page(data, page, 0, PAGE_SIZE); > put_page(page); > } else > memset(data, 0, PAGE_SIZE); > -- > 2.28.0.rc0.12.gb6a658bd00c9 > >