diff options
author | David Sterba <dsterba@suse.com> | 2024-03-15 00:07:40 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-03-15 00:07:40 +0100 |
commit | bb12921b8af7a101f50c08f94807a3238fc01566 (patch) | |
tree | 3414337d76de492a591880f9e742a6c6373c98be | |
parent | 76c49eb686771c7af5a0e6a973bd0d3360a8774f (diff) | |
download | btrfs-progs-bb12921b8af7a101f50c08f94807a3238fc01566.tar.gz |
btrfs-progs: handle btfs_del_items() failure in truncate_free_ino_items()
Do proper error handling like in the rest of the function.
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | common/clear-cache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/clear-cache.c b/common/clear-cache.c index d57313b7..960c3466 100644 --- a/common/clear-cache.c +++ b/common/clear-cache.c @@ -542,7 +542,11 @@ int truncate_free_ino_items(struct btrfs_root *root) } ret = btrfs_del_item(trans, root, &path); - BUG_ON(ret); + if (ret < 0) { + btrfs_abort_transaction(trans, ret); + btrfs_release_path(&path); + goto out; + } btrfs_release_path(&path); } |