Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1330593eb2d055bdd6ed935886cf2c13c896b288
Commit:     1330593eb2d055bdd6ed935886cf2c13c896b288
Parent:     fc0e15a667121e02686cc52679f6272959fb60cc
Author:     Vignesh Babu <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 18 09:11:02 2007 -0400
Committer:  Theodore Ts'o <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 09:11:02 2007 -0400

    ext4: Use is_power_of_2()
    
    Replace (n & (n-1)) in the context of power of 2 checks with
    is_power_of_2()
    
    Signed-off-by: Vignesh Babu <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Dave Kleikamp <[EMAIL PROTECTED]>
    Signed-off-by: "Theodore Ts'o" <[EMAIL PROTECTED]>
---
 fs/ext4/super.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b47259f..6dcbb28 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -36,6 +36,7 @@
 #include <linux/namei.h>
 #include <linux/quotaops.h>
 #include <linux/seq_file.h>
+#include <linux/log2.h>
 
 #include <asm/uaccess.h>
 
@@ -1644,7 +1645,7 @@ static int ext4_fill_super (struct super_block *sb, void 
*data, int silent)
                sbi->s_inode_size = le16_to_cpu(es->s_inode_size);
                sbi->s_first_ino = le32_to_cpu(es->s_first_ino);
                if ((sbi->s_inode_size < EXT4_GOOD_OLD_INODE_SIZE) ||
-                   (sbi->s_inode_size & (sbi->s_inode_size - 1)) ||
+                   (!is_power_of_2(sbi->s_inode_size)) ||
                    (sbi->s_inode_size > blocksize)) {
                        printk (KERN_ERR
                                "EXT4-fs: unsupported inode size: %d\n",
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to