diff options
Diffstat (limited to 'io_uring/memmap.h')
| -rw-r--r-- | io_uring/memmap.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/io_uring/memmap.h b/io_uring/memmap.h index 08419684e4bc..58002976e0c3 100644 --- a/io_uring/memmap.h +++ b/io_uring/memmap.h @@ -36,4 +36,16 @@ static inline bool io_region_is_set(struct io_mapped_region *mr) return !!mr->nr_pages; } +static inline void io_region_publish(struct io_ring_ctx *ctx, + struct io_mapped_region *src_region, + struct io_mapped_region *dst_region) +{ + /* + * Once published mmap can find it without holding only the ->mmap_lock + * and not ->uring_lock. + */ + guard(mutex)(&ctx->mmap_lock); + *dst_region = *src_region; +} + #endif |
