Re: [PATCH 26/26] mm page_fault: Reduce code complexity

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

 



On Wed, May 27, 2020 at 06:33:30PM +0800, hui yang wrote:
> if pte_alloc_one fail alloc a page, do_fault_around will return 0.
> and in do_read_fault()->__do_fault(), it also pte_alloc_one a page.
> if pte_alloc_one failed to alloc a page,it will return VM_FAULT_OOM.
> To reduce code complexity,if alloc failed we return VM_FAULT_OOM.

This doesn't reduce code complexity at all.  You've made this error
different from every other error handled by this function because now
it returns directly instead of jumping to 'out:'.  I can't understand
your explanation, and at first glance I'm not even sure this patch is
correct.  Definitely not a simplification, so NAK with this justification.
The patch might be correct, but it'll need a lot better prose than this.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux