gluster: Move glfs_close() to create's clean-up
commit0375003df4153dce7f3ece9285b27427f00f9e01
authorMax Reitz <mreitz@redhat.com>
Tue, 13 Feb 2018 13:03:50 +0000 (13 14:03 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 13 Feb 2018 15:18:25 +0000 (13 16:18 +0100)
treea7437e9831badad711b0ed3640ca0ad377c00f34
parent0e448a05444ddc602d2857a17f31042631a75946
gluster: Move glfs_close() to create's clean-up

glfs_close() is a classical clean-up operation, as can be seen by the
fact that it is executed even if the truncation before it failed.
Also, moving it to clean-up makes it more clear that if it fails, we do
not want it to overwrite the current ret value if that signifies an
error already.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/gluster.c