Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp7200303imm; Tue, 28 Aug 2018 08:00:35 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYL4Z/i87fvAQm25TVt/upwOSiLpr6RshbN/DvU/ts0mhpPlzpMA9yOoygkA5hT0C16RrQ1 X-Received: by 2002:a63:e4b:: with SMTP id 11-v6mr423393pgo.320.1535468435251; Tue, 28 Aug 2018 08:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535468435; cv=none; d=google.com; s=arc-20160816; b=WzI9S5+qq5tp8BuZILNabnWgyGq9Y+ggA3ipR/kl/GlvLE82wDu98btOeZ3auoZcbv N0gtzzkuvN+o5mh3IgiJnN/qunbFgUbj4fpQ7UwdooeS2BLLg48N1B7oxSHgSab41JlQ MU7qy1pKqvk8c54W8uyEbrg5/CqR3W2kWtHzJ6PKUnQJ0sdrVuycRTcvxX25087cVh/1 zd+jcyFijSODpA7/3I43zimI+vZDLRQ5sVzB9sEZzRcsjf5+/+cr8OCzt0d/DhLATaqF e+DeIASjok28wduZi29ccCG7LT7gkW5BWCPYC3m6TADlleS9q26PUyNKXrD0sfWwzVdb ntJQ== 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=N7Vh+kzAINa93+ASlwx4IbhXwzGgaGba3pGlvT4L2Pg=; b=dH5zscHgVJMgs+1NfxaJ7O9nGl3Ls7WT23BvEA3ofgtxa4fNnaBynYwjd3RjgpaG5z Dlela2QpbnV8mr2Sz3y0/O8pY3brNrPlgAyqJDouApVakkeZilllvqGUyRpnkccunp3A zBdHxLxkBRm/ieXRUdymChsKfok5BJMDpZebwlpba6ZHX9D3R0QAtNxER4UHX2XKr0gx GGD8Mqz4p9gvIbB88/lawKX4td0iuaKA4I5cB7imySFpmwlNPiwjmM+GLrlP9oDqez2L u5jDg4BcspUCO29naQ7fUTM55l6D/Cy7jP+TKlHmvYu3fPZi6C5+eIAljm8YE16fMr/V r7CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=c3pnzV8C; 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 i10-v6si1256367pgf.649.2018.08.28.08.00.20; Tue, 28 Aug 2018 08:00:35 -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=c3pnzV8C; 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 S1728247AbeH1Stl (ORCPT + 99 others); Tue, 28 Aug 2018 14:49:41 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:57504 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727827AbeH1Stk (ORCPT ); Tue, 28 Aug 2018 14:49:40 -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=N7Vh+kzAINa93+ASlwx4IbhXwzGgaGba3pGlvT4L2Pg=; b=c3pnzV8C4rOFDmfWYfYw/Ky8t l7oqI8HLtpXIfpdL563lpWUIsZ0yQHq0UVuSQP2FyKaYGf6BHhUkXPc0K+OfUAb34zOiPcN5pBZ22 /oJ6w70YyMn86pQ/YtRPJzlIZuKCtmfBkscQv8V6dUZwy4kyD7OkAYzGO4oaPkAwSVDU0NOGVDsIN pZcKyrn+8gzVPwhgXhQ7c95qYDecemHCK2M6AOjR/HBLBVfx1FBfUGmfVwJ+Hv8MvNA+cE3UkCJWw 49gaszjah0NENyPvwxyKuabRsH9ffUn/XLSVAd1HRdhqSooebI8I1oBZhayoj4z421TLixzSyPxGr lDF4JCTVQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fufR2-0003AD-8E; Tue, 28 Aug 2018 14:57:36 +0000 From: Matthew Wilcox To: Andrew Morton Cc: Matthew Wilcox , Nicolas Pitre , Souptick Joarder , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/10] cramfs: Convert to use vmf_insert_mixed Date: Tue, 28 Aug 2018 07:57:19 -0700 Message-Id: <20180828145728.11873-2-willy@infradead.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180828145728.11873-1-willy@infradead.org> References: <20180828145728.11873-1-willy@infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cramfs is the only remaining user of vm_insert_mixed; convert it. Signed-off-by: Matthew Wilcox --- fs/cramfs/inode.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index f408994fc632..b72449c19cd1 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c @@ -417,10 +417,15 @@ static int cramfs_physmem_mmap(struct file *file, struct vm_area_struct *vma) */ int i; vma->vm_flags |= VM_MIXEDMAP; - for (i = 0; i < pages && !ret; i++) { + for (i = 0; i < pages; i++) { + vm_fault_t vmf; unsigned long off = i * PAGE_SIZE; pfn_t pfn = phys_to_pfn_t(address + off, PFN_DEV); - ret = vm_insert_mixed(vma, vma->vm_start + off, pfn); + vmf = vmf_insert_mixed(vma, vma->vm_start + off, pfn); + if (vmf & VM_FAULT_ERROR) { + pages = i; + break; + } } } -- 2.18.0