diff options
Diffstat (limited to 'fs/hfsplus')
-rw-r--r-- | fs/hfsplus/btree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index a9b9e87..90ebab7 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c @@ -10,6 +10,7 @@ #include <linux/slab.h> #include <linux/pagemap.h> +#include <linux/log2.h> #include "hfsplus_fs.h" #include "hfsplus_raw.h" @@ -69,7 +70,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id) } size = tree->node_size; - if (!size || size & (size - 1)) + if (!is_power_of_2(size)) goto fail_page; if (!tree->node_count) goto fail_page; |