diff options
Diffstat (limited to 'src/backend/storage/aio/aio.c')
| -rw-r--r-- | src/backend/storage/aio/aio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/storage/aio/aio.c b/src/backend/storage/aio/aio.c index a12b785ade6..c4c2d8cc4b1 100644 --- a/src/backend/storage/aio/aio.c +++ b/src/backend/storage/aio/aio.c @@ -53,7 +53,7 @@ static inline void pgaio_io_update_state(PgAioHandle *ioh, PgAioHandleState new_state); static void pgaio_io_reclaim(PgAioHandle *ioh); -static void pgaio_io_resowner_register(PgAioHandle *ioh); +static void pgaio_io_resowner_register(PgAioHandle *ioh, struct ResourceOwnerData *resowner); static void pgaio_io_wait_for_free(void); static PgAioHandle *pgaio_io_from_wref(PgAioWaitRef *iow, uint64 *ref_generation); static const char *pgaio_io_state_get_name(PgAioHandleState s); @@ -217,7 +217,7 @@ pgaio_io_acquire_nb(struct ResourceOwnerData *resowner, PgAioReturn *ret) pgaio_my_backend->handed_out_io = ioh; if (resowner) - pgaio_io_resowner_register(ioh); + pgaio_io_resowner_register(ioh, resowner); if (ret) { @@ -406,13 +406,13 @@ pgaio_io_update_state(PgAioHandle *ioh, PgAioHandleState new_state) } static void -pgaio_io_resowner_register(PgAioHandle *ioh) +pgaio_io_resowner_register(PgAioHandle *ioh, struct ResourceOwnerData *resowner) { Assert(!ioh->resowner); - Assert(CurrentResourceOwner); + Assert(resowner); - ResourceOwnerRememberAioHandle(CurrentResourceOwner, &ioh->resowner_node); - ioh->resowner = CurrentResourceOwner; + ResourceOwnerRememberAioHandle(resowner, &ioh->resowner_node); + ioh->resowner = resowner; } /* |
