Free btrfs_trans_handle if btrfs_commit_transaction_async() fails. Signed-off-by: Tsutomu Itoh <t-i...@jp.fujitsu.com> --- fs/btrfs/ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff -urNp linux-2.6.39-rc1/fs/btrfs/ioctl.c linux-2.6.39-rc1.new/fs/btrfs/ioctl.c --- linux-2.6.39-rc1/fs/btrfs/ioctl.c 2011-03-30 04:09:47.000000000 +0900 +++ linux-2.6.39-rc1.new/fs/btrfs/ioctl.c 2011-04-04 09:52:17.000000000 +0900 @@ -2436,8 +2436,10 @@ static noinline long btrfs_ioctl_start_s return PTR_ERR(trans); transid = trans->transid; ret = btrfs_commit_transaction_async(trans, root, 0); - if (ret) + if (ret) { + kmem_cache_free(btrfs_trans_handle_cachep, trans); return ret; + } if (argp) if (copy_to_user(argp, &transid, sizeof(transid))) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html