projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57a5a88
)
Btrfs: unlock on error in btrfs_delalloc_reserve_metadata()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Mon, 30 Jul 2012 08:15:15 +0000
(
02:15
-0600)
committer
Chris Mason
<chris.mason@oracle.com>
Tue, 28 Aug 2012 20:53:25 +0000
(16:53 -0400)
We should release this mutex before returning the error code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
fs/btrfs/extent-tree.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/extent-tree.c
b/fs/btrfs/extent-tree.c
index 4e1b153b7c47c99e00adffd8ee6d24e2db29093d..45c69c4184c9a6070883ef42e6f3d805a72192eb 100644
(file)
--- 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);