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=-3.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no 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 DD80CC2BA83 for ; Wed, 12 Feb 2020 07:25:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5485206DB for ; Wed, 12 Feb 2020 07:25:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PE3nT39C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728298AbgBLHZ2 (ORCPT ); Wed, 12 Feb 2020 02:25:28 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:56384 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727669AbgBLHZ1 (ORCPT ); Wed, 12 Feb 2020 02:25:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; 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=R4BkbIQqThnCgZWEqCEkI+WObheyvlAJY7Qy0+QXFV8=; b=PE3nT39CztaAkde9egXKF0aZck o9PSh1z8mM/s6QYfPprG4MWm7aBPxgaEfa09Cw0/L1HluzaEln3ZcqLOkynCacVE/tbFNM+eaqgEw Ii/4Y3Z4X+X2OC14UYJimkV3pmllqvWnrKbttXwIddZOozctrP4m5pI4ZsdZk8Ft+KTjOHUnljy62 E+0UDhnTp8ytqPDAZUrdDAwr84a7jEP4Y3teFsFKZOJvNJKJVWvyYNop+z4iaejEnKIwy4LeJeazb TpcrIjS9Ij3SRbVy5l0zatffgJRtIScBdDCP5mp1jjrz5U7HnR1LZomOS9z+qXb9CJdyCIie9Mt5Q 45g0BsyQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1mOi-0000sC-TL; Wed, 12 Feb 2020 07:25:24 +0000 Date: Tue, 11 Feb 2020 23:25:24 -0800 From: Christoph Hellwig To: Johannes Thumshirn Cc: David Sterba , "linux-btrfs @ vger . kernel . org" , Christoph Hellwig Subject: Re: [PATCH v7 2/8] btrfs: don't kmap() pages from block devices Message-ID: <20200212072524.GA30977@infradead.org> References: <20200212071704.17505-1-johannes.thumshirn@wdc.com> <20200212071704.17505-3-johannes.thumshirn@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200212071704.17505-3-johannes.thumshirn@wdc.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Wed, Feb 12, 2020 at 04:16:58PM +0900, Johannes Thumshirn wrote: > Block device mappings are never in highmem so kmap() / kunmap() calls for > pages from block devices are unneeded. Use page_address() instead of > kmap() to get to the virtual addreses. > > While we're at it, read_cache_page_gfp() doesn't return NULL on error, > only an ERR_PTR, so use IS_ERR() to check for errors. > > Suggested-by: Christoph Hellwig > Signed-off-by: Johannes Thumshirn Looks good, Reviewed-by: Christoph Hellwig