summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/orphan.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/orphan.c')
-rw-r--r--fs/btrfs/orphan.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/orphan.c b/fs/btrfs/orphan.c
index 79cba5f..f8be250 100644
--- a/fs/btrfs/orphan.c
+++ b/fs/btrfs/orphan.c
@@ -56,8 +56,12 @@ int btrfs_del_orphan_item(struct btrfs_trans_handle *trans,
return -ENOMEM;
ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
- if (ret)
+ if (ret < 0)
goto out;
+ if (ret) {
+ ret = -ENOENT;
+ goto out;
+ }
ret = btrfs_del_item(trans, root, path);
OpenPOWER on IntegriCloud