Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btrfs-progs: improve error handling in btrfs_split_item() #921

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

adam900710
Copy link
Collaborator

This involves the following error cases:

  • Unable to find the original item Return -EAGAIN and release the path (which is not done in the original code)

  • Error from split_leaf() Remove the BUG_ON() and handle the error. The most common error is ENOSPC.

  • Error from kmalloc() Just handle the error and return -ENOMEM.

Issue: #312

This involves the following error cases:

- Unable to find the original item
  Return -EAGAIN and release the path (which is not done in the original
  code)

- Error from split_leaf()
  Remove the BUG_ON() and handle the error.
  The most common error is ENOSPC.

- Error from kmalloc()
  Just handle the error and return -ENOMEM.

Issue: kdave#312
Signed-off-by: Qu Wenruo <[email protected]>
@adam900710 adam900710 merged commit 27346ca into kdave:devel Nov 22, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant