函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\aio.c Create Date:2022-07-29 10:53:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:SYSCALL_DEFINE3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb, struct io_event __user *, result)

返回类型:

参数:

2006  ret等于负EINVAL
2008  u64 obj = iocb
2010  如果此条件成立可能性小(为编译器优化)(Careful: we have to cast the result to the type of the pointer* for sign reasons(key, & he kernel sets aio_key to the req # ))则返回:负EFAULT
2012  如果此条件成立可能性小(为编译器优化)(key != KIOCB_KEY)则返回:负EINVAL
2015  ctx等于lookup_ioctx(ctx_id)
2016  如果此条件成立可能性小(为编译器优化)(!ctx)则返回:负EINVAL
2019  spin_lock_irq( & ctx_lock)
2022  如果异步请求指针恒等于obj
2023  ret等于ki_cancel( & rw)
2024  删除链表项并重新初始化
2025  退出
2028  spin_unlock_irq( & ctx_lock)
2030  如果非ret
2036  ret等于负EINPROGRESS
2039  percpu计数引用减
2041  返回:ret