Re: [PATCH] fs: dax: Adding new return type vm_fault_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 17, 2018 at 09:05:07PM +0530, Souptick Joarder wrote:
> There was an existing bug inside dax_load_hole()
> if vm_insert_mixed had failed to allocate a page table,
> we'd return VM_FAULT_NOPAGE instead of VM_FAULT_OOM.
> With vmf_insert_mixed this issue is addressed.
> 
> vmf_insert_mixed_mkwrite() is the new wrapper function
> which will convert err returned from vm_insert_mixed_
> mkwrite() to vm_fault_t type.

Since dax is the only caller of vm_insert_mixed_mkwrite(), rather
than introducing a wrapper function, you should just convert
vm_insert_mixed_mkwrite() to vmf_insert_mixed_mkwrite().

>  	int error, major = 0;
>  	bool write = vmf->flags & FAULT_FLAG_WRITE;
>  	bool sync;
> -	int vmf_ret = 0;
> +	vm_fault_t vmf_ret = 0;

I'd rename this to just 'ret' like everywhere else.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux