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:	Tue, 18 Mar 2008 12:31:36 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Miklos Szeredi <miklos@...redi.hu>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [patch 3/8] mm: rotate_reclaimable_page() cleanup

On Mon, 2008-03-17 at 20:19 +0100, Miklos Szeredi wrote:
> plain text document attachment (rotate_reclaimable_page_cleanup.patch)
> From: Miklos Szeredi <mszeredi@...e.cz>
> 
> Clean up messy conditional calling of test_clear_page_writeback() from
> both rotate_reclaimable_page() and end_page_writeback().

> -int rotate_reclaimable_page(struct page *page)
> +void  rotate_reclaimable_page(struct page *page)
>  {
> -	struct pagevec *pvec;
> -	unsigned long flags;
> -
> -	if (PageLocked(page))
> -		return 1;
> -	if (PageDirty(page))
> -		return 1;
> -	if (PageActive(page))
> -		return 1;
> -	if (!PageLRU(page))
> -		return 1;

Might be me, but I find the above easier to read than

> +	if (!PageLocked(page) && !PageDirty(page) && !PageActive(page) &&
> +	    PageLRU(page)) {
>  



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ