From patchwork Thu Sep 27 17:14:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10618357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4038215E8 for ; Thu, 27 Sep 2018 17:11:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2396F2BC6D for ; Thu, 27 Sep 2018 17:11:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17B512BC6A; Thu, 27 Sep 2018 17:11:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B240F2BC6D for ; Thu, 27 Sep 2018 17:11:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A458F8E0005; Thu, 27 Sep 2018 13:11:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9F40E8E0001; Thu, 27 Sep 2018 13:11:00 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E3E98E0005; Thu, 27 Sep 2018 13:11:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by kanga.kvack.org (Postfix) with ESMTP id 4C6D98E0001 for ; Thu, 27 Sep 2018 13:11:00 -0400 (EDT) Received: by mail-pf1-f200.google.com with SMTP id d22-v6so3499983pfn.3 for ; Thu, 27 Sep 2018 10:11:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:date:from:to:cc:subject :message-id:mime-version:content-disposition:user-agent; bh=1VrnHCnILd5gFvjDOCvByF+TX90ebeQzsgY3LJkvNfs=; b=szyHo5OEwHZAERfqxCKyMx8nxVs/l8kfh9eJJeC+KbbcbfVS3pgVjrpS9dEujEluOP zVdBofmNPd67H8loyPIpfR7F1tnsSWvl0H42UFd+04rwpk3L0kHvoGR5YIYrUm4Lp32c yzEmdt0TfVP2u/Ztjv4Rsm5AhlzXbFOHP7JXH1rf01WppVXUG4sOC+eDHlhMM3ZHipji DPnizuFVoISRnIqKNJKoqAUfbmojJEN8HEBedriP7315Zk5OuF0BrErIWIHR3SC+nF5R GbIENq1NPjx0Bn21kbQ6+N7gFdhGcm4gFNMl2o69blObYQ42mOaQB84EJ9ySlmG0j1va 6aiQ== X-Gm-Message-State: ABuFfoh5g8NYUJi8PF5fJ9m9MxmZgk0LqEjurxQlEoNiHOjvV+R0RMwf 7abSgvzchnY6M3KIbgBFMPHO2Z5yw7x9BdgoWvadyOA4EmyJYvCqRndljuHcKe6zQhu5w8znBY8 KFd9Utn9u6pwFeUiAUnnoMUTv2f4m7QfB/i9eCetATW/ai+aursAPV80G79DhDb0cP+zJI/Co3N fKIDN4qICoD1tEHP//Iy5xko5mLQ6IoXgJwQwloxvEObEuVZoyESYAhstEgqfqdiiFtkcZtTwPJ iZrnLvXzQ8vb9DViYf/X1Z1BSRg7kvFIhBxGG4TZhmRiFak726fz2ynsW0nJvLA8o10vOrmfM/L x2BYN17AyQ3YuI/h8wKp+G9Hnrje2vnWQRir4daHp0LXguK/NT99rzyLivZdWwqLBxShSVPrBOM M X-Received: by 2002:a62:11cb:: with SMTP id 72-v6mr12508589pfr.120.1538068259925; Thu, 27 Sep 2018 10:10:59 -0700 (PDT) X-Received: by 2002:a62:11cb:: with SMTP id 72-v6mr12508556pfr.120.1538068259254; Thu, 27 Sep 2018 10:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538068259; cv=none; d=google.com; s=arc-20160816; b=gZqw3yj0gp5SL+6SYRlqewRfavRmdLM/rQ8vr72PUh3zkNDs/fXPzI+EkuD73NrcXr GT4jWsfjJQf5JfF06w+VRN6m6S+e1MAqGocA9Io8XR+rVbApI0+qMMH3XPtp+cHpWZmG MVe3sbSP92+fUCTVvdDv16YOVphx1QW6+XdfmUUn5d5M5i2SkbUgGa5x8D3wdofdTD1d mjZljWlcmD4Zo+kDaFxdi9eG1Z34a8ihCNSqiUqP8hf/fTLknANtU5oj4zY5PcLLpphv /jTE5Yhn2brkfqNA6XRWB9oMnSfhGENtEe95o9EVPlEZP9wrXwwgY0Vt2mLSlHSNySSR ZJwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:content-disposition:mime-version:message-id:subject:cc :to:from:date:dkim-signature; bh=1VrnHCnILd5gFvjDOCvByF+TX90ebeQzsgY3LJkvNfs=; b=uK2gfaDRzEYwqH47vXR4yELBVOwA//gvzntZfx9BtB+HNvUGe/tAfd1uymEl4/z5zt 2+q9YWfVvzmORl6Y6Wp1mxjSkDwV9NTCauzdhu3mUFtKrSfalJZ0WnJXDddy7YzLLFtJ 71LbmqKPILsbLU1aHDg+sSp5xSo9zJVE8rsZ81I3R9JH0Hj1GivIyNGbRqckeX+t7mD8 mADo7HNTV+6CQW9HdjXQL7xV/SNXzVFB8g2N9JKafMzH1D0cPb9gwLMkf24kiaSNRM3A oawOaGbw8JK8HFvSH2+0u1Nps1kpydOyXclAcZ348YqOFD2M1rkxi7ymQJzeh7HoyLid I43A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ij7ZomAW; spf=pass (google.com: domain of jrdr.linux@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jrdr.linux@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id k20-v6sor537999pgb.17.2018.09.27.10.10.59 for (Google Transport Security); Thu, 27 Sep 2018 10:10:59 -0700 (PDT) Received-SPF: pass (google.com: domain of jrdr.linux@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ij7ZomAW; spf=pass (google.com: domain of jrdr.linux@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jrdr.linux@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=1VrnHCnILd5gFvjDOCvByF+TX90ebeQzsgY3LJkvNfs=; b=ij7ZomAWzkOSTPH70o/9t/7Xv33kQAH+upCcdBV/iqZqVyvdaxOnMOnZ6ouSOtTDPz JmswDJLwyxhCvYmy8ZZKqexf0IKuOkwnknKgJg1oBha1aaIoGor2b01lKBBDso8DxcGV cU1QaVW5nRfDtSQbeqRdcYKLCYGKagf9UQvi/ugHN2RO7nGF22LKUjNciXZYsZ8mk+3Z EjxF7HJJaDo8sQbY6n+lTWpp3xSzSD4hi7FvRhS5i8ExLDMZsSOyXBTi3i50YVMPGvMC GD74YTFS5n+LJ4aB/CxYER242Ro6jAl2iehru/ilK7J/qPygzpc4aQXuj3krb5U4Cwtz /yoA== X-Google-Smtp-Source: ACcGV60LJia+8/UeIOf96JXEHYEBNH2jIZiVQw6G0162szjFW+6nzRp6xh+661Fmo1L83kE8J99PMA== X-Received: by 2002:a63:7b09:: with SMTP id w9-v6mr11430317pgc.385.1538068258639; Thu, 27 Sep 2018 10:10:58 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([49.205.219.124]) by smtp.gmail.com with ESMTPSA id y4-v6sm3554134pfl.188.2018.09.27.10.10.56 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Sep 2018 10:10:57 -0700 (PDT) Date: Thu, 27 Sep 2018 22:44:12 +0530 From: Souptick Joarder To: willy@infradead.org, akpm@linux-foundation.org, jack@suse.cz, mgorman@techsingularity.net, ak@linux.intel.com, jlayton@kernel.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/filemap.c: Use vmf_error() Message-ID: <20180927171411.GA23331@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP These codes can be replaced with new inline vmf_error(). Signed-off-by: Souptick Joarder Reviewed-by: Jan Kara --- mm/filemap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 52517f2..7d04d7c 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2581,9 +2581,7 @@ vm_fault_t filemap_fault(struct vm_fault *vmf) * system is low on memory, or a problem occurs while trying * to schedule I/O. */ - if (error == -ENOMEM) - return VM_FAULT_OOM; - return VM_FAULT_SIGBUS; + return vmf_error(error); page_not_uptodate: /*