提交 7e1fea73 编写于 作者: J Josef Bacik

Btrfs: fixup return code for btrfs_del_orphan_item

If the orphan item doesn't exist, we return 1, which doesn't make any sense to
the callers.  Instead return -ENOENT if we didn't find the item.  Thanks,
Signed-off-by: NJosef Bacik <josef@redhat.com>
上级 b8399dee
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册