Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aio_poll

Proto:static int aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb)

Type:int

Parameter:

TypeParameterName
struct aio_kiocb *aiocb
const struct iocb *iocb
1735  ctx = ki_ctx
1736  req = poll
1738  bool cancel = false
1742  If aio_buf != aio_buf Then Return -EINVAL
1745  If aio_offset || aio_nbytes || RWF_* flags Then Return -EINVAL
1748  INIT_WORK( & work, aio_poll_complete_work)
1749  events = demangle_poll(aio_buf) | EPOLLERR | EPOLLHUP
1751  head = NULL
1752  done = false
1753  cancelled = false
1755  _qproc = aio_poll_queue_proc
1756  _key = events
1757  iocb = aiocb
1758  error = -EINVAL
1761  Initialization list head
1762  init_waitqueue_func_entry( & wait, aio_poll_wake)
1764  mask = vfs_poll(file, & pt) & events
1765  spin_lock_irq( & ctx_lock)
1766  If Value is more likely to compile time(head) Then
1767  spin_lock( & lock)
1769  If error Then cancel = true
1771  error = 0
1772  mask = 0
1774  If mask || error Then
1776  Else if cancel Then
1777  WRITE_ONCE(cancelled, true)
1778  Else if Not done Then
1782  spin_unlock( & lock)
1784  If mask Then
1785  sult code for this event = mangle_poll(mask)
1786  error = 0
1788  spin_unlock_irq( & ctx_lock)
1789  If mask Then iocb_put(aiocb)
1791  Return error
Caller
NameDescribe
__io_submit_one