Skip to content

Commit 55982ea

Browse files
authored
Merge pull request ceph#61492 from idryomov/wip-69619
librbd: clear ctx before initiating close in Image::{aio_,}close() Reviewed-by: Ramana Raja <[email protected]>
2 parents 8dc4de1 + 61baa87 commit 55982ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librbd/librbd.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,8 +1704,8 @@ namespace librbd {
17041704
ImageCtx *ictx = (ImageCtx *)ctx;
17051705
tracepoint(librbd, close_image_enter, ictx, ictx->name.c_str(), ictx->id.c_str());
17061706

1707+
ctx = NULL; // before initiating close
17071708
r = ictx->state->close();
1708-
ctx = NULL;
17091709

17101710
tracepoint(librbd, close_image_exit, r);
17111711
}
@@ -1721,9 +1721,9 @@ namespace librbd {
17211721
ImageCtx *ictx = (ImageCtx *)ctx;
17221722
tracepoint(librbd, aio_close_image_enter, ictx, ictx->name.c_str(), ictx->id.c_str(), c->pc);
17231723

1724+
ctx = NULL; // before initiating close
17241725
ictx->state->close(new C_AioCompletion(ictx, librbd::io::AIO_TYPE_CLOSE,
17251726
get_aio_completion(c)));
1726-
ctx = NULL;
17271727

17281728
tracepoint(librbd, aio_close_image_exit, 0);
17291729
return 0;

0 commit comments

Comments
 (0)