Btrfs: abort transaction if fill_holes() fails
authorJosef Bacik <jbacik@fb.com>
Mon, 14 Nov 2016 19:06:22 +0000 (14:06 -0500)
committerDavid Sterba <dsterba@suse.com>
Wed, 30 Nov 2016 12:45:19 +0000 (13:45 +0100)
commitf94480bd7be6bb1b0823d1036f3ee4ebe7450172
tree185626f23c4cf4c5be566f9984d2ede1137904e7
parent62fe51c1d0100ff07a761cd077872e01f2a2b8ca
Btrfs: abort transaction if fill_holes() fails

At this point we will have dropped extent entries from the file, so if we fail
to insert the new hole entries then we are leaving the fs in a corrupt state
(albeit an easily fixed one).  Abort the transaciton if this happens so we can
avoid corrupting the fs.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c