projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add file position info to proc
[powerpc.git]
/
fs
/
hfs
/
btree.c
diff --git
a/fs/hfs/btree.c
b/fs/hfs/btree.c
index
4003579
..
8a3a650
100644
(file)
--- a/
fs/hfs/btree.c
+++ b/
fs/hfs/btree.c
@@
-9,6
+9,7
@@
*/
#include <linux/pagemap.h>
*/
#include <linux/pagemap.h>
+#include <linux/log2.h>
#include "btree.h"
#include "btree.h"
@@
-21,10
+22,9
@@
struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
struct page *page;
unsigned int size;
struct page *page;
unsigned int size;
- tree = k
m
alloc(sizeof(*tree), GFP_KERNEL);
+ tree = k
z
alloc(sizeof(*tree), GFP_KERNEL);
if (!tree)
return NULL;
if (!tree)
return NULL;
- memset(tree, 0, sizeof(*tree));
init_MUTEX(&tree->tree_lock);
spin_lock_init(&tree->hash_lock);
init_MUTEX(&tree->tree_lock);
spin_lock_init(&tree->hash_lock);
@@
-77,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;
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;
goto fail_page;
if (!tree->node_count)
goto fail_page;