[lkml]   [2018]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] fs: Convert return type int to vm_fault_t
On Thu, Aug 30, 2018 at 10:55:47PM +0530, Souptick Joarder wrote:
> +vm_fault_t block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
> + get_block_t get_block, int *err)

I don't like returning both the errno and the vm_fault_t. To me that's a
sign we need to rethink this interface.

I have two suggestions. First, we could allocate a new VM_FAULT_NOSPC
bit. Second, we could repurpose one of the existing bits, such as
VM_FAULT_RETRY for this purpose.

> -int ext4_page_mkwrite(struct vm_fault *vmf)
> +vm_fault_t ext4_page_mkwrite(struct vm_fault *vmf)

I also think perhaps we could start by _not_ converting block_page_mkwrite().
Just convert ext4_page_mkwrite(), and save converting block_page_mkwrite()
for later.

 \ /
  Last update: 2018-09-03 06:50    [W:0.121 / U:7.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site