Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2457039imm; Sat, 16 Jun 2018 19:20:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKCm0DhslKeOw+2tjVvNIQtj3Dxo0WtHNyFRi9pvIaPUrMhCGTtyHG4t8FywiKc62gOkfP8 X-Received: by 2002:a65:55c6:: with SMTP id k6-v6mr6610478pgs.6.1529202049959; Sat, 16 Jun 2018 19:20:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529202049; cv=none; d=google.com; s=arc-20160816; b=vEW9lncyNqFr3G2bIs/Nk60zN3tsibhfXLLjLik9uJ7k6nPj2KKi0dZXJ5ppdgEnK4 +tQ41kyKJ25ntEeG+U9A/iJk4hsXjHxCNhcN5Y5844VNCoweiEHWdeEqx23c9uwTIzKF GZgRoeH1233jSkCELeYSwoBsCS/xEShVFB3VVKFDRr3Gf5/rzDPZ6J8nStk920MOwXo0 RZbQ5aI7IU+UKiNR+u3PhkjyGKd0ouP8n/eP/vlCypGyLqbGun0rL5BYWXU6CEakJ2C5 QjZJIug+JWfMEUy1b00OD0mlz+OsxFaqB7UgvbqOve8YP7UNziyOnRw2+ssk6mAEtV2J 8BWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=yNFVHUulQCNDiyqX2nmhpxJWZEpVPHmMj67swxyAnJQ=; b=JjIUi7hkRzltYHT8pX6phi+B6jSHI79ZTvWiQq0u3g/uz3Tnc3sMa+aKz66zknyd79 AkqdscxsNipTfnwppC/Z6zJ8H7k7OzxyU+Az+lhhT42sdysXcWdRettUFcc7XRefyMxy onrOMhzPRNEK4IFYvtj0EvsUIoKZs8m8JQkIW662WLzIwNZYKgSukhTtgXNw2KIrzkqi S0sYneVxDjhTu2zkplOdRJ3qnpHTGsqjp5/P7N7bx+j/cQTJqE3zHB28ejxBR2oTnIKE 0vxIYSZZTK9d8crwtKQPv+BqrKX2+HoyopKrF5Fd5GZW51heiQCCtZZ7ZF3CHlM1Gs8p 83Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=p1mzyKvw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x66-v6si9341119pgb.297.2018.06.16.19.20.35; Sat, 16 Jun 2018 19:20:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=p1mzyKvw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933615AbeFQCBA (ORCPT + 99 others); Sat, 16 Jun 2018 22:01:00 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58668 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933344AbeFQCA6 (ORCPT ); Sat, 16 Jun 2018 22:00:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=yNFVHUulQCNDiyqX2nmhpxJWZEpVPHmMj67swxyAnJQ=; b=p1mzyKvwWeQapKax5CKf3LvCP 4eroi3VUBIYJzvh/2C7YcZhZS3IGQOZ535q+XmMw2paYiFmrUjrHUZ66FKXsM5V0bF2jtaaI5dTal UhAqB86xX+PMvfMkrNROSJM61+f9QkUxJih6mgEK3Du5gTU91WQI8K1/22voLwtWMrF6OlqKTsk8Q N4ClQFEKoWBR8PL4CCm+TVLzVDAoCjmwcsczHrvkdxImX+gKXYufVh3YbWplnS7Hiqolh9U1Qsq+n xaTY2LKVKQiyzm2tdfZs5z/P/epnVihk3OF9zl1x3AxD2p9TuhgKQSs12vb1/jivP8HYnIaiq/zGg 429qMsPvA==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUMzu-0001Fj-UL; Sun, 17 Jun 2018 02:00:54 +0000 From: Matthew Wilcox To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Matthew Wilcox , Jan Kara , Jeff Layton , Lukas Czerner , Ross Zwisler , Christoph Hellwig , Goldwyn Rodrigues , Nicholas Piggin , Ryusuke Konishi , linux-nilfs@vger.kernel.org, Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH v14 03/74] dax: Fix use of zero page Date: Sat, 16 Jun 2018 18:59:41 -0700 Message-Id: <20180617020052.4759-4-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180617020052.4759-1-willy@infradead.org> References: <20180617020052.4759-1-willy@infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use my_zero_pfn instead of ZERO_PAGE, and pass the vaddr to it so it works on MIPS and s390. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- fs/dax.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 467601a134bc..c7917b46a75b 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1093,21 +1093,12 @@ static vm_fault_t dax_load_hole(struct address_space *mapping, void *entry, { struct inode *inode = mapping->host; unsigned long vaddr = vmf->address; - vm_fault_t ret = VM_FAULT_NOPAGE; - struct page *zero_page; - pfn_t pfn; - - zero_page = ZERO_PAGE(0); - if (unlikely(!zero_page)) { - ret = VM_FAULT_OOM; - goto out; - } + pfn_t pfn = pfn_to_pfn_t(my_zero_pfn(vaddr)); + vm_fault_t ret; - pfn = page_to_pfn_t(zero_page); dax_insert_mapping_entry(mapping, vmf, entry, pfn, RADIX_DAX_ZERO_PAGE, false); ret = vmf_insert_mixed(vmf->vma, vaddr, pfn); -out: trace_dax_load_hole(inode, vmf, ret); return ret; } -- 2.17.1