From patchwork Wed May 16 05:43:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 914171 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OGgfynmn"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40m3MM4hP7z9s0y for ; Wed, 16 May 2018 15:46:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Im1YMEE87kumgKllb/mzdfUWYCf+WHxh58IB4Ou3O7I=; b=OGgfynmnPF7JjmMclZfMhifSVt OjsHg2Q6ipDxVAszYzHpnm4/3tlp4sRQeUyiu7ljcgPk3AQLzmsT6o/KZn/crItMeA+pBAzmRfjD1 egKhOy/S7XZvS13NcBCUpDl0Qir/E6G1w+EX/FXgijI/SPoIkHeRm9WsefV/N+0hxhUOdDBtwRVhq nY/zLXx0xibCnmrXeRAlYXxNfGn44nURrErfd7+436Itm554V61pJLFjIFboi4FbL5YXcSRJg1BVq +VqcAqGcdGLI9rlWJ6sayGlJLmi9ycSj0OEErXgLtIMR+bgx1PPLE6MhN+RsAsI1jIFPOA48DMawg Fjh6nTaA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIpG8-0001hh-Np; Wed, 16 May 2018 05:45:56 +0000 Received: from [93.83.86.253] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIpEA-0007yz-H5; Wed, 16 May 2018 05:43:55 +0000 From: Christoph Hellwig To: Souptick Joarder , Matthew Wilcox Subject: [PATCH 01/14] orangefs: don't return errno values from ->fault Date: Wed, 16 May 2018 07:43:35 +0200 Message-Id: <20180516054348.15950-2-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180516054348.15950-1-hch@lst.de> References: <20180516054348.15950-1-hch@lst.de> X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org, ocfs2-devel@oss.oracle.com, devel@lists.orangefs.org, linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, ceph-devel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, lustre-devel@lists.lustre.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Christoph Hellwig --- fs/orangefs/file.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 26358efbf794..b4a25cd4f3fa 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -528,18 +528,16 @@ static long orangefs_ioctl(struct file *file, unsigned int cmd, unsigned long ar return ret; } -static int orangefs_fault(struct vm_fault *vmf) +static vm_fault_t orangefs_fault(struct vm_fault *vmf) { struct file *file = vmf->vma->vm_file; int rc; - rc = orangefs_inode_getattr(file->f_mapping->host, 0, 1, - STATX_SIZE); - if (rc == -ESTALE) - rc = -EIO; + + rc = orangefs_inode_getattr(file->f_mapping->host, 0, 1, STATX_SIZE); if (rc) { gossip_err("%s: orangefs_inode_getattr failed, " "rc:%d:.\n", __func__, rc); - return rc; + return VM_FAULT_SIGBUS; } return filemap_fault(vmf); }