Fixes: #14186
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
<< "wasn't configured?" << dendl;
}
- // stop sync thread
- lock.Lock();
- stop = true;
- sync_cond.Signal();
- lock.Unlock();
- sync_thread.join();
-
- wbthrottle.stop();
-
- goto close_current_fd;
+ goto stop_sync;
}
}
if (g_conf->filestore_debug_omap_check && !object_map->check(err2)) {
derr << err2.str() << dendl;
ret = -EINVAL;
- goto close_current_fd;
+ goto stop_sync;
}
}
// all okay.
return 0;
+stop_sync:
+ // stop sync thread
+ lock.Lock();
+ stop = true;
+ sync_cond.Signal();
+ lock.Unlock();
+ sync_thread.join();
+
+ wbthrottle.stop();
close_current_fd:
VOID_TEMP_FAILURE_RETRY(::close(current_fd));
current_fd = -1;