summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/export.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:25:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:25:28 +0000
commita80d58b9b74ee560796b7d05522b85f8aac0f83d (patch)
treeae35ca367da23826dac3b62455bede286f20154f /fs/btrfs/export.c
parentReleasing progress-linux version 6.1.85-1~progress6.99u1. (diff)
downloadlinux-a80d58b9b74ee560796b7d05522b85f8aac0f83d.tar.xz
linux-a80d58b9b74ee560796b7d05522b85f8aac0f83d.zip
Merging upstream version 6.1.90.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fs/btrfs/export.c')
-rw-r--r--fs/btrfs/export.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/btrfs/export.c b/fs/btrfs/export.c
index fab7eb76e..58b0f04d7 100644
--- a/fs/btrfs/export.c
+++ b/fs/btrfs/export.c
@@ -161,8 +161,15 @@ struct dentry *btrfs_get_parent(struct dentry *child)
ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
if (ret < 0)
goto fail;
+ if (ret == 0) {
+ /*
+ * Key with offset of -1 found, there would have to exist an
+ * inode with such number or a root with such id.
+ */
+ ret = -EUCLEAN;
+ goto fail;
+ }
- BUG_ON(ret == 0); /* Key with offset of -1 found */
if (path->slots[0] == 0) {
ret = -ENOENT;
goto fail;