This patch fixes the error handling issues in mirror_extend_file().
Change-Id: I388295886657cf9b9b072017002be937a9e657c0
Test-Parameters: trivial testlist=sanity-flr
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: https://review.whamcloud.com/30914
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
rc = llapi_file_flush(fd);
if (rc < 0) {
error_loc = "cannot get data version";
- return rc;
+ goto out;
}
rc = llapi_file_flush(fdv);
if (rc < 0) {
error_loc = "cannot get data version";
- return rc;
+ goto out;
}
/* Make sure we keep original atime/mtime values */
rc = migrate_copy_timestamps(fd, fdv);
+ if (rc < 0) {
+ error_loc = "cannot copy timestamp";
+ goto out;
+ }
/* Atomically put lease, swap layouts and close.
* for a migration we need to check data version on file did