Btrfs: don't leak transaction in btrfs_sync_file()
authorFilipe David Borba Manana <fdmanana@gmail.com>
Wed, 11 Sep 2013 19:36:44 +0000 (20:36 +0100)
committerChris Mason <chris.mason@fusionio.com>
Sat, 21 Sep 2013 15:05:29 +0000 (11:05 -0400)
commita0634be562c27ddee7c94bce4f765f8071244e07
tree0c32bf5f94d9a63d86975515f2ea706669702303
parenta724b4369097897db45d61108c0e976912e586c7
Btrfs: don't leak transaction in btrfs_sync_file()

In btrfs_sync_file(), if the call to btrfs_log_dentry_safe() returns
a negative error (for e.g. -ENOMEM via btrfs_log_inode()), we would
return without ending/freeing the transaction.

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/file.c