[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <594c3b59-b6f0-0e87-6acb-04161e555d7e@web.de>
Date: Mon, 16 Dec 2019 12:32:09 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Chao Yu <yuchao0@...wei.com>,
linux-f2fs-devel@...ts.sourceforge.net
Cc: linux-kernel@...r.kernel.org, chao@...nel.org,
Jaegeuk Kim <jaegeuk@...nel.org>
Subject: Re: [RFC PATCH v5] f2fs: support data compression
…
> +++ 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
Powered by blists - more mailing lists