aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/root-tree.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <[email protected]>2020-01-21 18:36:59 +0000
committerGreg Kroah-Hartman <[email protected]>2020-01-21 18:36:59 +0000
commitdd7d99dc688d0fc448976f52f8517fbdeccdccda (patch)
tree4ad59de5d584cf03e772ee153260c24ba0d717bd /fs/btrfs/root-tree.c
parentphy: ti: j721e-wiz: Fix build error without CONFIG_OF_ADDRESS (diff)
parentLinux 5.5-rc7 (diff)
downloadkernel-dd7d99dc688d0fc448976f52f8517fbdeccdccda.tar.gz
kernel-dd7d99dc688d0fc448976f52f8517fbdeccdccda.zip
Merge 5.5-rc7 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'fs/btrfs/root-tree.c')
-rw-r--r--fs/btrfs/root-tree.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c
index 3b17b647d002..612411c74550 100644
--- a/fs/btrfs/root-tree.c
+++ b/fs/btrfs/root-tree.c
@@ -376,11 +376,13 @@ again:
leaf = path->nodes[0];
ref = btrfs_item_ptr(leaf, path->slots[0],
struct btrfs_root_ref);
-
- WARN_ON(btrfs_root_ref_dirid(leaf, ref) != dirid);
- WARN_ON(btrfs_root_ref_name_len(leaf, ref) != name_len);
ptr = (unsigned long)(ref + 1);
- WARN_ON(memcmp_extent_buffer(leaf, name, ptr, name_len));
+ if ((btrfs_root_ref_dirid(leaf, ref) != dirid) ||
+ (btrfs_root_ref_name_len(leaf, ref) != name_len) ||
+ memcmp_extent_buffer(leaf, name, ptr, name_len)) {
+ err = -ENOENT;
+ goto out;
+ }
*sequence = btrfs_root_ref_sequence(leaf, ref);
ret = btrfs_del_item(trans, tree_root, path);