X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fhfs%2Fbtree.c;h=8a3a650abc87a9ed4520318a811fb76619933a7e;hb=1670b2b2716b98541765da94be1332ad5c314b7a;hp=5fd0ed71f92331c3553ef9d563c0543e9fc9e9f6;hpb=a12f66fccf2e266ad197df142b5ebafc6a169a8c;p=linux-2.6-omap-h63xx.git diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index 5fd0ed71f92..8a3a650abc8 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c @@ -9,6 +9,7 @@ */ #include +#include #include "btree.h" @@ -76,7 +77,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke tree->depth = be16_to_cpu(head->depth); 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;