[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180516054348.15950-2-hch@lst.de>
Date: Wed, 16 May 2018 07:43:35 +0200
From: Christoph Hellwig <hch@....de>
To: Souptick Joarder <jrdr.linux@...il.com>,
Matthew Wilcox <willy@...radead.org>
Cc: linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, devel@...ts.orangefs.org,
ceph-devel@...r.kernel.org, linux-btrfs@...r.kernel.org,
linux-ext4@...r.kernel.org, ocfs2-devel@....oracle.com,
linux-mtd@...ts.infradead.org, dri-devel@...ts.freedesktop.org,
lustre-devel@...ts.lustre.org,
linux-arm-kernel@...ts.infradead.org, linux-s390@...r.kernel.org
Subject: [PATCH 01/14] orangefs: don't return errno values from ->fault
Signed-off-by: Christoph Hellwig <hch@....de>
---
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);
}
--
2.17.0
Powered by blists - more mailing lists