summaryrefslogtreecommitdiffstats
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 790cd6a..2f39d05 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)
recoff = hfs_bnode_read_u16(node, node->tree->node_size - (rec + 1) * 2);
if (!recoff)
return 0;
- if (node->tree->attributes & HFS_TREE_BIGKEYS) {
- retval = hfs_bnode_read_u16(node, recoff) + 2;
- if (retval > node->tree->max_key_len + 2) {
- printk(KERN_ERR "hfs: keylen %d too large\n",
- retval);
- retval = 0;
- }
- } else {
- retval = (hfs_bnode_read_u8(node, recoff) | 1) + 1;
- if (retval > node->tree->max_key_len + 1) {
- printk(KERN_ERR "hfs: keylen %d too large\n",
- retval);
- retval = 0;
- }
+
+ retval = hfs_bnode_read_u16(node, recoff) + 2;
+ if (retval > node->tree->max_key_len + 2) {
+ printk(KERN_ERR "hfs: keylen %d too large\n",
+ retval);
+ retval = 0;
}
}
return retval;
OpenPOWER on IntegriCloud