btrfs: do an allocation earlier during snapshot creation
authorDavid Sterba <dsterba@suse.com>
Tue, 10 Nov 2015 17:53:56 +0000 (18:53 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 7 Jan 2016 14:20:54 +0000 (15:20 +0100)
commita1ee736268448d74af25737568e383acb84c3c18
tree2216e2f064209ade5011543d89da9f3dfbb075c8
parent4fb72bf2e913ca3798afd9e226e2416918936e49
btrfs: do an allocation earlier during snapshot creation

We can allocate pending_snapshot earlier and do not have to do cleanup
in case of failure.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c