Re: [PATCH 1/2] filemap: fix the conditional folio_put in filemap_fault

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

 



On Wed, May 03, 2023 at 04:48:20PM +0100, Matthew Wilcox wrote:
> > -		folio_put(folio);
> 
> Why not simply:
> 
> -	if (folio)
> +	if (!IS_ERR_OR_NULL(folio))

no need for the OR_NULL.  But I find the extra label way easier to
reason about, and it's exactly the same amount of code.




[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