From c8f174ac92de245f6ce0c3022711ab3ad39a09c5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 2 Dec 2021 14:58:31 +0100 Subject: [PATCH] io/uring/Operation: disallow copying --- src/io/uring/Operation.hxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/io/uring/Operation.hxx b/src/io/uring/Operation.hxx index a8c3b4adc..d915392d1 100644 --- a/src/io/uring/Operation.hxx +++ b/src/io/uring/Operation.hxx @@ -45,10 +45,15 @@ class Operation { CancellableOperation *cancellable = nullptr; public: + Operation() noexcept = default; + ~Operation() noexcept { CancelUring(); } + Operation(const Operation &) = delete; + Operation &operator=(const Operation &) = delete; + /** * Are we waiting for the operation to complete? */