diff options
Diffstat (limited to 'fs/hfs/btree.c')
-rw-r--r-- | fs/hfs/btree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index 5fd0ed71f923..8a3a650abc87 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/pagemap.h> | 11 | #include <linux/pagemap.h> |
12 | #include <linux/log2.h> | ||
12 | 13 | ||
13 | #include "btree.h" | 14 | #include "btree.h" |
14 | 15 | ||
@@ -76,7 +77,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke | |||
76 | tree->depth = be16_to_cpu(head->depth); | 77 | tree->depth = be16_to_cpu(head->depth); |
77 | 78 | ||
78 | size = tree->node_size; | 79 | size = tree->node_size; |
79 | if (!size || size & (size - 1)) | 80 | if (!is_power_of_2(size)) |
80 | goto fail_page; | 81 | goto fail_page; |
81 | if (!tree->node_count) | 82 | if (!tree->node_count) |
82 | goto fail_page; | 83 | goto fail_page; |