lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 16 Dec 2019 21:24:22 +0800
From:   Chao Yu <chao@...nel.org>
To:     Markus Elfring <Markus.Elfring@....de>,
        Chao Yu <yuchao0@...wei.com>,
        linux-f2fs-devel@...ts.sourceforge.net
Cc:     Jaegeuk Kim <jaegeuk@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [f2fs-dev] [RFC PATCH v5] f2fs: support data compression

On 2019-12-16 19:32, Markus Elfring wrote:
> …
>> +++ 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;

That's f2fs coding style, I guess it will a little bit easiler to understand one 
single condition than understanding combined one.

Thanks,

>
>
> Would you like to apply similar transformations at other source code places?
>
> Regards,
> Markus
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@...ts.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ