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:	Fri, 24 Apr 2009 10:03:31 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	"Robert P. J. Day" <rpjday@...shcourse.ca>
CC:	linux-ext4@...r.kernel.org, Andrew Morton <akpm@...l.org>
Subject: Re: [PATCH] EXT4:  Use is_power_of_2() routine for clarity.

Robert P. J. Day wrote:
> Signed-off-by: Robert P. J. Day <rpjday@...shcourse.ca>

Looks fine, thanks.

Reviewed-by: Eric Sandeen <sandeen@...hat.com>

> ---
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 2958f4e..479d5ef 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1479,7 +1479,7 @@ set_qf_format:
>  				return 0;
>  			if (option < 0 || option > (1 << 30))
>  				return 0;
> -			if (option & (option - 1)) {
> +			if (!is_power_of_2(option)) {
>  				printk(KERN_ERR "EXT4-fs: inode_readahead_blks"
>  				       " must be a power of 2\n");
>  				return 0;
> @@ -2092,7 +2092,7 @@ static ssize_t inode_readahead_blks_store(struct ext4_attr *a,
>  		return -EINVAL;
> 
>  	/* inode_readahead_blks must be a power of 2 */
> -	if (t & (t-1))
> +	if (!is_power_of_2(t))
>  		return -EINVAL;
> 
>  	sbi->s_inode_readahead_blks = t;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ