Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp203866ybe; Thu, 5 Sep 2019 20:37:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMdWVeWBlG7MUXXXjiySD8YdeMVHeOQuMvtuO45c+9J1HOWWumucfq+C875caMsAiI2KUY X-Received: by 2002:a17:90a:8911:: with SMTP id u17mr7760581pjn.128.1567741059411; Thu, 05 Sep 2019 20:37:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567741059; cv=none; d=google.com; s=arc-20160816; b=hVosPNihlwx0x2Kf24XOO/S8ZBfsj91an5mKei3aNgcF2YqvA28eQsEKrEEFNhDntg gtzucgC7o8mKHoPnVBzrjCC2OaPHV0SDASlgVhXrIrP76GRCfwoX0+EanMn5Ubhywc12 jl+wyDi2ndbZL/jKGpQDiEp4FwbuXA8zb0KzJXN0BJnMOpYdswXRBRm7aLtdMoqQTaXS UJKC57mU1BSEXzn6MbsL+FTReEhWGmVF/DvoYgr03xPaiWmImiVWIgi0Rb+/fAU8Qk1v g7I+3oQ0Y4D6DtjoMdrJEzJqUhCPG8IfxZb2rhc6IjPwvhzQmiM9qrpl+nJq83a0Lk4z RC7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8h3UhHiEI4pJMKlOZTLVFE7Tkc+/1Cl1/3KhMdpiUok=; b=xf0r5BFcuIaDMkyfiMJlwKH6+C06mQ1rkCM01pkSrTzzPdSOgwYwoIiRh9Hna5COKX y0IED2bV25VJmEXFtRD8BXbIVkeV4Zo4oMsB4ubFX3GWFjSgXo4MCLGyiUu9YuIFXaCv byq2CdLqqKaZgsvbhUVNr9ci8cacK7yO3Ee6EOg4Tep/CuA85/hO9/FMDwmEvjIW//ma wrFUw/ZCLYFtsCAuZ1bSsHBP1iPPAATI0nJ2b6viw+uo/NdZ7tAu+ixfijefsjDjUKsE vlE6kTdHiWoxraw5m3hZpBT5hJJ+NsS++QedNovrA3naz+crcldIcaw/DmEbXqkFfLsi +BBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TGgiknxf; 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 n3si3399081pgb.68.2019.09.05.20.37.23; Thu, 05 Sep 2019 20:37:39 -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=TGgiknxf; 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 S2387802AbfIES7U (ORCPT + 99 others); Thu, 5 Sep 2019 14:59:20 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:48692 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728258AbfIES7U (ORCPT ); Thu, 5 Sep 2019 14:59:20 -0400 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: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=8h3UhHiEI4pJMKlOZTLVFE7Tkc+/1Cl1/3KhMdpiUok=; b=TGgiknxf0qcRw92OkyIuYcJY1 ARsWI5gB5o1gK+YcuC1pa3ViRvQXo09k4k8TDCfD+AQ/KAAdB74dK7r/29HSYR/llqLciCQB1LzGT EmHraC/V/dDuWS+cCvlk7I/GLVIXElKWMSLBKEMgyWBycpyRW5Mgc6FybOLmes9FnCudHFzWTIHTX PPxBtW0u1kNMy7juXrwfpRPAhTyvS2eFK9iCo4GxNRAryBCnMJHwbexMrhocGNow7oxfm1e8Y+KxX rPbSWTqG5JafAsjItBQMTlBRJZETe2d6DpCP2BOYasS6p5kMlZ+dDS7hLhlAiaNXoVNoTcaPPdfkO ZZAQXDY/Q==; Received: from willy by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i5wyM-0006TE-8X; Thu, 05 Sep 2019 18:59:10 +0000 Date: Thu, 5 Sep 2019 11:59:10 -0700 From: Matthew Wilcox To: Souptick Joarder Cc: akpm@linux-foundation.org, rcampbell@nvidia.com, jglisse@redhat.com, mhocko@suse.com, aneesh.kumar@linux.ibm.com, peterz@infradead.org, airlied@redhat.com, thellstrom@vmware.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/memory.c: Convert to use vmf_error() Message-ID: <20190905185910.GS29434@bombadil.infradead.org> References: <1567708980-8804-1-git-send-email-jrdr.linux@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1567708980-8804-1-git-send-email-jrdr.linux@gmail.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 06, 2019 at 12:13:00AM +0530, Souptick Joarder wrote: > +++ b/mm/memory.c > @@ -1750,13 +1750,10 @@ static vm_fault_t __vm_insert_mixed(struct vm_area_struct *vma, > } else { > return insert_pfn(vma, addr, pfn, pgprot, mkwrite); > } > - > - if (err == -ENOMEM) > - return VM_FAULT_OOM; > - if (err < 0 && err != -EBUSY) > - return VM_FAULT_SIGBUS; > - > - return VM_FAULT_NOPAGE; > + if (!err || err == -EBUSY) > + return VM_FAULT_NOPAGE; > + else > + return vmf_error(err); > } My plan is to convert insert_page() to return a VM_FAULT error code like insert_pfn() does. Need to finish off the vm_insert_page() conversions first ;-)