]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - fs/eventfd.c
UBUNTU: SAUCE: shiftfs: let userns root destroy subvolumes from other users
[mirror_ubuntu-hirsute-kernel.git] / fs / eventfd.c
index df466ef81dddfa05c6e6b3f90eaf0a8a352b53a7..e265b6dd4f345f55cea7775bdb08b938023711b7 100644 (file)
@@ -182,11 +182,14 @@ static __poll_t eventfd_poll(struct file *file, poll_table *wait)
        return events;
 }
 
-static void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt)
+void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt)
 {
+       lockdep_assert_held(&ctx->wqh.lock);
+
        *cnt = (ctx->flags & EFD_SEMAPHORE) ? 1 : ctx->count;
        ctx->count -= *cnt;
 }
+EXPORT_SYMBOL_GPL(eventfd_ctx_do_read);
 
 /**
  * eventfd_ctx_remove_wait_queue - Read the current counter and removes wait queue.