1
0
mirror of https://github.com/ceph/ceph synced 2025-04-01 23:02:17 +00:00

Merge PR into master

* refs/pull/36777/head:
	osdc/Journaler: do not call onsafe->complete() if onsafe is 0

Reviewed-by: Zheng Yan <zyan@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
Patrick Donnelly 2020-08-31 13:21:14 -07:00
commit 628d9ae267
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB

View File

@ -704,7 +704,8 @@ void Journaler::wait_for_flush(Context *onsafe)
{
lock_guard l(lock);
if (is_stopping()) {
onsafe->complete(-EAGAIN);
if (onsafe)
onsafe->complete(-EAGAIN);
return;
}
_wait_for_flush(onsafe);
@ -737,7 +738,8 @@ void Journaler::flush(Context *onsafe)
{
lock_guard l(lock);
if (is_stopping()) {
onsafe->complete(-EAGAIN);
if (onsafe)
onsafe->complete(-EAGAIN);
return;
}
_flush(wrap_finisher(onsafe));