lkml.org 
[lkml]   [2019]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH v5] f2fs: support data compression
From
Date

> +++ b/fs/f2fs/compress.c
> @@ -0,0 +1,1139 @@

> +bool f2fs_is_compressed_page(struct page *page)
> +{
> + if (!PagePrivate(page))
> + return false;
> + if (!page_private(page))
> + return false;
> + if (IS_ATOMIC_WRITTEN_PAGE(page) || IS_DUMMY_WRITTEN_PAGE(page))
> + return false;


How do you think about to combine condition checks like the following?

+ if (!PagePrivate(page) || !page_private(page) ||
+ IS_ATOMIC_WRITTEN_PAGE(page) || IS_DUMMY_WRITTEN_PAGE(page))
+ return false;


Would you like to apply similar transformations at other source code places?

Regards,
Markus

\
 
 \ /
  Last update: 2019-12-16 12:33    [W:0.272 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site