Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1553256imm; Fri, 28 Sep 2018 22:30:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV63QUISH4UKbloQlRUQ2qUamkfN/wGz61P6R3aslYf9yjxfgH8ojl0aNIhZuFnW0nLWx5nRt X-Received: by 2002:a63:cb51:: with SMTP id m17-v6mr1527386pgi.105.1538199013232; Fri, 28 Sep 2018 22:30:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538199013; cv=none; d=google.com; s=arc-20160816; b=fxgB+fhyjUpalC78UwxbHxBmcbnTsWqtti447QYXQ/qd0RJwwN9dTKBYrFmYeHTbIN owvaozE9P/IEgDVMbhqI3UUkP5nkdOCAO7zUEqxxjxVVLsO+7pxEMC/1iEV2qV3THPkU 1OdvNbitrtgeoIvcgIDu7B/6/Uz2sTO4SqWatQaQ4N1ukSmNKY/CQfw0IONrT1v6hNu7 BjM3ze+bn93aS5AVG2zeLOfNspiW1q73MfkErYuvL5C7gCxh6xG4QnpZjX5+w/jDd6Ot vIjjkcxWCuFi+Ak0C4EYlSMbEPkUd8/oC3r5cPFoJFDYse19dlUg9a7kSF2uXA+GqMKr wBpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=sKURuLnG6+rXgdpiSXqD/b4PBTHFMqgf08yEzk2rjag=; b=fLSN5w8Cbsk/Zwyyyd09ubUxBJuof+0CtScSDULzVqhLQzplMENQ7mEXpK8rRaIaz9 n2/+0ncqVnGFzvpB7BuRFXJO86pxE3SoTnit0SmEMVTySAgi/4c7Fd60CIXafLb5gP9R lPAvgP9saP97uFWdyrELqztLBIddA6SqntUcuJN4fkfzBeslYQwyBlq9r6bT8n7/lsCV pD4NS7q1Rb5lXXF4BODamwhXVGS9h9giM7MG3v0RLBzm1UZID1DALgLaWVI/Uzh/XziN N2xAacA9Nbuv5xrSthlNA4pU8QLqB/ZCoXvxby9dGtaMPEINPLGOj5Wa0cT8F0FiD7oQ e4Fw== ARC-Authentication-Results: i=1; mx.google.com; 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 67-v6si6396447pgi.606.2018.09.28.22.29.58; Fri, 28 Sep 2018 22:30:13 -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; 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 S1727447AbeI2L4y (ORCPT + 99 others); Sat, 29 Sep 2018 07:56:54 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13142 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726325AbeI2L4y (ORCPT ); Sat, 29 Sep 2018 07:56:54 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3223130E9DC0D; Sat, 29 Sep 2018 13:29:50 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.399.0; Sat, 29 Sep 2018 13:29:47 +0800 From: zhong jiang To: , CC: , , , Subject: [PATCH] fs/dax.c: Use vmf_error() helper Date: Sat, 29 Sep 2018 13:17:17 +0800 Message-ID: <1538198237-37466-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These codes can be replaced with new inline vmf_error(). Signed-off-by: zhong jiang --- fs/dax.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index b68ce48..e732f70 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1311,9 +1311,8 @@ static vm_fault_t dax_fault_return(int error) { if (error == 0) return VM_FAULT_NOPAGE; - if (error == -ENOMEM) - return VM_FAULT_OOM; - return VM_FAULT_SIGBUS; + + return vmf_error(error); } /* -- 1.7.12.4