Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\aio.c Create Date:2022-07-28 20:21:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:sys_io_cancel:* Attempts to cancel an iocb previously passed to io_submit. If* the operation is successfully cancelled, the resulting event is* copied into the memory pointed to by result without being placed* into the completion queue and 0 is returned

Proto:SYSCALL_DEFINE3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb, struct io_event __user *, result)

Type:

Parameter:Nothing

2006  ret = -EINVAL
2008  u64 obj = iocb
2010  If Value for the false possibility is greater at compile time(Get a simple variable from user space(key, & he kernel sets aio_key to the req # )) Then Return -EFAULT
2012  If Value for the false possibility is greater at compile time(key != KIOCB_KEY) Then Return -EINVAL
2015  ctx = lookup_ioctx(ctx_id)
2016  If Value for the false possibility is greater at compile time(!ctx) Then Return -EINVAL
2019  spin_lock_irq( & ctx_lock)
2022  If what iocb this event came from == obj Then
2023  ret = ki_cancel( & rw)
2024  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
2025  Break
2028  spin_unlock_irq( & ctx_lock)
2030  If Not ret Then
2036  ret = -EINPROGRESS
2039  percpu_ref_put - decrement a percpu refcount*@ref: percpu_ref to put* Decrement the refcount, and if 0, call the release function (which was passed* to percpu_ref_init())* This function is safe to call as long as @ref is between init and exit.
2041  Return ret