Commit 55e591ff authored by Dan Carpenter's avatar Dan Carpenter Committed by Chris Mason
Browse files

Btrfs: unlock on error in btrfs_delalloc_reserve_metadata()

We should release this mutex before returning the error code.
Signed-off-by: default avatarDan Carpenter <>
parent 57a5a882
......@@ -4571,8 +4571,10 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
if (root->fs_info->quota_enabled) {
ret = btrfs_qgroup_reserve(root, num_bytes +
nr_extents * root->leafsize);
if (ret)
if (ret) {
return ret;
ret = reserve_metadata_bytes(root, block_rsv, to_reserve, flush);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment