Messages in this thread | | | Date | Sun, 2 Sep 2018 21:49:49 -0700 | From | Matthew Wilcox <> | Subject | Re: [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.
| |