aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfsplus')
-rw-r--r--fs/hfsplus/btree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
index a9b9e872e29a..90ebab753d30 100644
--- a/fs/hfsplus/btree.c
+++ b/fs/hfsplus/btree.c
@@ -10,6 +10,7 @@
10 10
11#include <linux/slab.h> 11#include <linux/slab.h>
12#include <linux/pagemap.h> 12#include <linux/pagemap.h>
13#include <linux/log2.h>
13 14
14#include "hfsplus_fs.h" 15#include "hfsplus_fs.h"
15#include "hfsplus_raw.h" 16#include "hfsplus_raw.h"
@@ -69,7 +70,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id)
69 } 70 }
70 71
71 size = tree->node_size; 72 size = tree->node_size;
72 if (!size || size & (size - 1)) 73 if (!is_power_of_2(size))
73 goto fail_page; 74 goto fail_page;
74 if (!tree->node_count) 75 if (!tree->node_count)
75 goto fail_page; 76 goto fail_page;