Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1406286pxu; Mon, 23 Nov 2020 22:11:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJx647sY8v5J/snzzy6TXYzEpzZz0NrKLFuNCxe8esik6e7qH6M5/KKF3KquyhPMEQ9XpjY2 X-Received: by 2002:aa7:c886:: with SMTP id p6mr2364925eds.352.1606198260917; Mon, 23 Nov 2020 22:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606198260; cv=none; d=google.com; s=arc-20160816; b=YHvKk+bZRlAjD0LLUlU1rTUm+09meKKnBDD3YjNNMCQ7keYbhILU1coavWFD64DXwn FK0pXkp1EpI9Ta+5Lv9maiXKwi0PERVogEzsH6gnMSwSiKEA5vGzUNfvIdpwnX9oZ7zN rGq7/V6zREBFaf/X6lKlFVMxuk7qxnJkvULvDWawAmShg22n9wq1jLy49guJFS7jocNI zgEQV6Zuu/69AYSizaJLWO+/9zIcK9S710syCohePWn8tlJWg+0mgisJHhR27+M758W3 D5E0ml4LyELPkSCjydcqhf/J/2xC8A2jFDMxpFmqwbRG9I+XVa+YcjxXiQEV7NLn3Chm U5+A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=Qm6UQDgnAXbkH2aoraFrOvrgvc/JvV8N62uuRcp0ai4=; b=TTd+tn3LJoRuQtqL8oqXsMKv8FASmFYAK0GD+71iwWiWXHwDiYbINGzlRAEYF0dRq5 p96cJsBDifhpnpieqmSWXgehYvsL71f0kL0eAoJZL6aX2LSbscsz6IHoOxBVszopkmSD 2HYuBYUkyFUzc8lJEXp9haRyywegWWgw3jsGeoyMAvhEPMjJBoFmdaA5rBZQZyR+gxf1 s9V4pQH3zdflBebFmLtPUwybfISPcNslEeR7Nk5idzvtlt6MmVdR7aIhDX3eudUnBmR6 YsCv+gKbp+NpUkwavDG9F8/8Z0ouCVImdVnFRIsRdjQZbgxNa8Ckdk3h7Be4+8i3/Q8Q hGGA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hd32si7413754ejc.160.2020.11.23.22.10.38; Mon, 23 Nov 2020 22:11:00 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729454AbgKXGIM (ORCPT + 99 others); Tue, 24 Nov 2020 01:08:12 -0500 Received: from mga06.intel.com ([134.134.136.31]:47294 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729392AbgKXGIL (ORCPT ); Tue, 24 Nov 2020 01:08:11 -0500 IronPort-SDR: 1Z+3Tman/scoZ5qFR7ic5+jypipBycLcIB8HXHSQu49OP02nmd+t8D1tRBtT5S0tKB/ExT/RG4 PK5/lbbUvKpw== X-IronPort-AV: E=McAfee;i="6000,8403,9814"; a="233504033" X-IronPort-AV: E=Sophos;i="5.78,365,1599548400"; d="scan'208";a="233504033" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2020 22:08:10 -0800 IronPort-SDR: fSg3kho9RP5PF2oBZ9Oax6baDQfnypO/Zh2vyAMYdMBMqWduVgHU3/aejc8UCPzQECHJHD4ebm 6foDhsN7ZrhA== X-IronPort-AV: E=Sophos;i="5.78,365,1599548400"; d="scan'208";a="358708241" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2020 22:08:09 -0800 From: ira.weiny@intel.com To: Andrew Morton Cc: Ira Weiny , Nicolas Pitre , 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 , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Kirti Wankhede , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 12/17] fs/cramfs: Use memcpy_from_page() Date: Mon, 23 Nov 2020 22:07:50 -0800 Message-Id: <20201124060755.1405602-13-ira.weiny@intel.com> X-Mailer: git-send-email 2.28.0.rc0.12.gb6a658bd00c9 In-Reply-To: <20201124060755.1405602-1-ira.weiny@intel.com> References: <20201124060755.1405602-1-ira.weiny@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ira Weiny Remove open coded kmap/memcpy/kunmap and use mempcy_from_page() instead. Cc: Nicolas Pitre Signed-off-by: Ira Weiny --- 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