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:
d24bec3
)
Btrfs: fix memory leak in start_transaction()
author
Miao Xie
<miaox@cn.fujitsu.com>
Thu, 20 Sep 2012 04:14:29 +0000
(22:14 -0600)
committer
Chris Mason
<chris.mason@fusionio.com>
Tue, 9 Oct 2012 13:15:38 +0000
(09:15 -0400)
This patch fixes memory leak of the transaction handle which happened
when starting transaction failed on a freezed fs.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
fs/btrfs/transaction.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/transaction.c
b/fs/btrfs/transaction.c
index 910ff8051ba93c99b6f655baf354e2e091a2913c..35489644c24783c925fd870f4fcb8bd80f36c285 100644
(file)
--- a/
fs/btrfs/transaction.c
+++ b/
fs/btrfs/transaction.c
@@
-351,8
+351,10
@@
again:
*/
if (type != TRANS_JOIN_NOLOCK &&
!__sb_start_write(root->fs_info->sb, SB_FREEZE_FS, false)) {
- if (type == TRANS_JOIN_FREEZE)
+ if (type == TRANS_JOIN_FREEZE) {
+ kmem_cache_free(btrfs_trans_handle_cachep, h);
return ERR_PTR(-EPERM);
+ }
sb_start_intwrite(root->fs_info->sb);
}