projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b44c59a
)
Btrfs: fix memory leak in btrfs_ioctl_start_sync()
author
Tsutomu Itoh
<t-itoh@jp.fujitsu.com>
Mon, 4 Apr 2011 01:52:13 +0000
(
01:52
+0000)
committer
Chris Mason
<chris.mason@oracle.com>
Tue, 5 Apr 2011 05:19:42 +0000
(
01:19
-0400)
Call btrfs_end_transaction() if btrfs_commit_transaction_async() fails.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ioctl.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/ioctl.c
b/fs/btrfs/ioctl.c
index 6b70e0e2bd1e224dd0bdcaf72d9a86f55e2944c2..255c7c5279c4a245f5d401b8b283539895b03d18 100644
(file)
--- a/
fs/btrfs/ioctl.c
+++ b/
fs/btrfs/ioctl.c
@@
-2436,8
+2436,10
@@
static noinline long btrfs_ioctl_start_sync(struct file *file, void __user *argp
return PTR_ERR(trans);
transid = trans->transid;
ret = btrfs_commit_transaction_async(trans, root, 0);
- if (ret)
+ if (ret) {
+ btrfs_end_transaction(trans, root);
return ret;
+ }
if (argp)
if (copy_to_user(argp, &transid, sizeof(transid)))