diff options
author | Greg Kroah-Hartman | 2020-01-22 09:05:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2020-01-22 09:05:34 +0100 |
commit | c318f074d9fdeae16e19cbb2ed53b50d2bcdfdb8 (patch) | |
tree | 44c6552fa919dfe1fc681949bf5d81fcf6a2beb8 /fs/btrfs/root-tree.c | |
parent | 7b2d7faa09fcbd0184634544f732f4b2da0b20a8 (diff) | |
parent | def9d2780727cec3313ed3522d0123158d87224d (diff) |
Merge 5.5-rc7 into staging-next
We want the staging fixes in here as well
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs/root-tree.c')
-rw-r--r-- | fs/btrfs/root-tree.c | 10 |
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); |