btrfs: sync ioctl, handle errors after transaction start
authorDavid Sterba <dsterba@suse.cz>
Mon, 19 Jan 2015 13:21:02 +0000 (14:21 +0100)
committerChris Mason <clm@fb.com>
Mon, 19 Jan 2015 21:05:44 +0000 (13:05 -0800)
commit98bd5c547ef2300f915fc1adce5b6f25c195d4d4
tree1c84d927fcfce33ff2688ba3a70c332dbbb2a68b
parent6f8960541b1eb6054a642da48daae2320fddba93
btrfs: sync ioctl, handle errors after transaction start

The version merged to 3.19 did not handle errors from start_trancaction
and could pass an invalid pointer to commit_transaction.

Fixes: 6b5fe46dfa52441f ("btrfs: do commit in sync_fs if there are pending changes")
Reported-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/super.c