Re: [RFC PATCH v5] f2fs: support data compression

From: Markus Elfring
Date: Mon Dec 16 2019 - 06:32:34 EST


â
> +++ 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