[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180516054348.15950-10-hch@lst.de>
Date: Wed, 16 May 2018 07:43:43 +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 09/14] ubifs: separate errno from VM_FAULT_* values
Signed-off-by: Christoph Hellwig <hch@....de>
---
fs/ubifs/file.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 1acb2ff505e6..7c1a2e1c3de5 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1513,7 +1513,7 @@ static int ubifs_releasepage(struct page *page, gfp_t unused_gfp_flags)
* mmap()d file has taken write protection fault and is being made writable.
* UBIFS must ensure page is budgeted for.
*/
-static int ubifs_vm_page_mkwrite(struct vm_fault *vmf)
+static vm_fault_t ubifs_vm_page_mkwrite(struct vm_fault *vmf)
{
struct page *page = vmf->page;
struct inode *inode = file_inode(vmf->vma->vm_file);
@@ -1521,6 +1521,7 @@ static int ubifs_vm_page_mkwrite(struct vm_fault *vmf)
struct timespec now = current_time(inode);
struct ubifs_budget_req req = { .new_page = 1 };
int err, update_time;
+ vm_fault_t ret = 0;
dbg_gen("ino %lu, pg %lu, i_size %lld", inode->i_ino, page->index,
i_size_read(inode));
@@ -1601,8 +1602,8 @@ static int ubifs_vm_page_mkwrite(struct vm_fault *vmf)
unlock_page(page);
ubifs_release_budget(c, &req);
if (err)
- err = VM_FAULT_SIGBUS;
- return err;
+ ret = VM_FAULT_SIGBUS;
+ return ret;
}
static const struct vm_operations_struct ubifs_file_vm_ops = {
--
2.17.0
Powered by blists - more mailing lists