Btrfs: return error code to caller when btrfs_del_item fails
The error code is returned instead of calling BUG_ON when btrfs_del_item returns the error. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
committed by
Chris Mason
parent
b0b802d7e3
commit
65a246c5ff
@ -385,7 +385,10 @@ again:
|
||||
*sequence = btrfs_root_ref_sequence(leaf, ref);
|
||||
|
||||
ret = btrfs_del_item(trans, tree_root, path);
|
||||
BUG_ON(ret);
|
||||
if (ret) {
|
||||
err = ret;
|
||||
goto out;
|
||||
}
|
||||
} else
|
||||
err = -ENOENT;
|
||||
|
||||
@ -397,6 +400,7 @@ again:
|
||||
goto again;
|
||||
}
|
||||
|
||||
out:
|
||||
btrfs_free_path(path);
|
||||
return err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user