aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/brec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfsplus/brec.c')
-rw-r--r--fs/hfsplus/brec.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/fs/hfsplus/brec.c b/fs/hfsplus/brec.c
index 790cd6a8605d..2f39d05443e1 100644
--- a/fs/hfsplus/brec.c
+++ b/fs/hfsplus/brec.c
@@ -42,20 +42,12 @@ u16 hfs_brec_keylen(struct hfs_bnode *node, u16 rec)
42 recoff = hfs_bnode_read_u16(node, node->tree->node_size - (rec + 1) * 2); 42 recoff = hfs_bnode_read_u16(node, node->tree->node_size - (rec + 1) * 2);
43 if (!recoff) 43 if (!recoff)
44 return 0; 44 return 0;
45 if (node->tree->attributes & HFS_TREE_BIGKEYS) { 45
46 retval = hfs_bnode_read_u16(node, recoff) + 2; 46 retval = hfs_bnode_read_u16(node, recoff) + 2;
47 if (retval > node->tree->max_key_len + 2) { 47 if (retval > node->tree->max_key_len + 2) {
48 printk(KERN_ERR "hfs: keylen %d too large\n", 48 printk(KERN_ERR "hfs: keylen %d too large\n",
49 retval); 49 retval);
50 retval = 0; 50 retval = 0;
51 }
52 } else {
53 retval = (hfs_bnode_read_u8(node, recoff) | 1) + 1;
54 if (retval > node->tree->max_key_len + 1) {
55 printk(KERN_ERR "hfs: keylen %d too large\n",
56 retval);
57 retval = 0;
58 }
59 } 51 }
60 } 52 }
61 return retval; 53 return retval;