lkml.org 
[lkml]   [2022]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 1/2] netfs: do not unlock and put the folio twice
Date
xiubli@redhat.com wrote:

> -error:
> +error_locked:
> folio_unlock(folio);
> folio_put(folio);
> +error_unlocked:

I would do:

error:
if (folio) {
folio_unlock(folio);
folio_put(folio);
}

David

\
 
 \ /
  Last update: 2022-07-07 14:54    [W:0.394 / U:3.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site