lkml.org 
[lkml]   [2017]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH/RESEND 2/5] mm/z3fold.c: extend compaction function
On Wed, Jan 4, 2017 at 4:43 PM, Dan Streetman <ddstreet@ieee.org> wrote:

<snip>
>> static int z3fold_compact_page(struct z3fold_header *zhdr)
>> {
>> struct page *page = virt_to_page(zhdr);
>> - void *beg = zhdr;
>> + int ret = 0;
>
> I still don't understand why you're adding ret and using goto. Just
> use return for each failure case.

I guess it's a matter of taste, I prefer having single function exit
elsewhere so I do it here too.

>> +
>> + if (test_bit(MIDDLE_CHUNK_MAPPED, &page->private))
>> + goto out;
>>
>> + if (zhdr->middle_chunks != 0) {
>
> you appear to have just re-sent all your patches without addressing
> comments; in patch 4 you invert the check and return, which is what
> you should have done here in the first place, as that change is
> unrelated to that patch.

Not quite, I just thought we'd agreed on the patch 4 being separate. I
folded the locking fixes but not header size fixes.

~vitaly

\
 
 \ /
  Last update: 2017-01-10 21:50    [W:0.086 / U:0.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site