diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-04-08 18:40:17 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-04-08 19:30:21 +0300 |
commit | aadd51aa71f8d013c818a312bb2a0c5714830dbc (patch) | |
tree | 28ca52d17183cb1d732b1324fce4f7b5d6b3dfc0 /fs/hfsplus/brec.c | |
parent | 68e942e88add0ac8576fc8397e86495edf3dcea7 (diff) | |
parent | ee90b81203a91d4e5385622811ee7872b5bcfe76 (diff) | |
download | linux-aadd51aa71f8d013c818a312bb2a0c5714830dbc.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Resolve conflicts between 5888b93 ("Merge branch 'nf-hook-compress'") and
Florian Westphal br_netfilter works.
Conflicts:
net/bridge/br_netfilter.c
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'fs/hfsplus/brec.c')
-rw-r--r-- | fs/hfsplus/brec.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/hfsplus/brec.c b/fs/hfsplus/brec.c index 6e560d56094b..754fdf8c6356 100644 --- a/fs/hfsplus/brec.c +++ b/fs/hfsplus/brec.c @@ -131,13 +131,16 @@ skip: hfs_bnode_write(node, entry, data_off + key_len, entry_len); hfs_bnode_dump(node); - if (new_node) { - /* update parent key if we inserted a key - * at the start of the first node - */ - if (!rec && new_node != node) - hfs_brec_update_parent(fd); + /* + * update parent key if we inserted a key + * at the start of the node and it is not the new node + */ + if (!rec && new_node != node) { + hfs_bnode_read_key(node, fd->search_key, data_off + size); + hfs_brec_update_parent(fd); + } + if (new_node) { hfs_bnode_put(fd->bnode); if (!new_node->parent) { hfs_btree_inc_height(tree); @@ -168,9 +171,6 @@ skip: goto again; } - if (!rec) - hfs_brec_update_parent(fd); - return 0; } @@ -370,6 +370,8 @@ again: if (IS_ERR(parent)) return PTR_ERR(parent); __hfs_brec_find(parent, fd, hfs_find_rec_by_key); + if (fd->record < 0) + return -ENOENT; hfs_bnode_dump(parent); rec = fd->record; |