[lkml]   [2022]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/6] iov_iter: new iov_iter_pin_pages*(), for FOLL_PIN pages
On 2/27/22 13:57, Jens Axboe wrote:
>> + return res;
>> + return (res == n ? len : res * PAGE_SIZE) - *start;
> Trying to be clever like that just makes the code a lot less readable. I
> should not have to reason about a return value. Same in the other
> function.

No argument there. This was shamelessly lifted from
iov_iter_get_pages(), and I initially calculated that keeping it
identical to that known-good code, where possible, was better than
fixing it up.

However, I'll go ahead and simplify it--with pleasure--based on this

John Hubbard

 \ /
  Last update: 2022-02-27 23:10    [W:0.101 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site