diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-07-30 02:15:15 -0600 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-08-28 16:53:25 -0400 |
commit | 55e591ffde38e0088b022129e035e18a8d04c7e6 (patch) | |
tree | 535f4dde9fab0a710d92a9e6a330aefc7a85e498 /fs | |
parent | 57a5a882031dba5cb7bc7ebc955b897498365fe2 (diff) | |
download | linux-55e591ffde38e0088b022129e035e18a8d04c7e6.tar.bz2 |
Btrfs: unlock on error in btrfs_delalloc_reserve_metadata()
We should release this mutex before returning the error code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 4e1b153b7c47..45c69c4184c9 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -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) { + mutex_unlock(&BTRFS_I(inode)->delalloc_mutex); return ret; + } } ret = reserve_metadata_bytes(root, block_rsv, to_reserve, flush); |