Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sys_io_setup:* Create an aio_context capable of receiving at least nr_events

Proto:SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp)

Type:

Parameter:Nothing

1314  struct kioctx * ioctx = NULL
1318  ret = Get a simple variable from user space(ctx, ctxp)
1319  If Value for the false possibility is greater at compile time(ret) Then Go to out
1322  ret = -EINVAL
1323  If Value for the false possibility is greater at compile time(ctx || nr_events == 0) Then
1324  pr_debug("EINVAL: ctx %lu nr_events %u\n", ctx, nr_events)
1326  Go to out
1329  ioctx = x_alloc* Allocates and initializes an ioctx. Returns an ERR_PTR if it failed.
1330  ret = PTR_ERR(ioctx)
1331  If Not IS_ERR(ioctx) Then
1332  ret = Write a simple value into user space(user_id, ctxp)
1333  If ret Then kill_ioctx* Cancels all outstanding aio requests on an aio context. Used* when the processes owning a context have all exited to encourage* the rapid destruction of the kioctx.
1335  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.
1338  out :
1339  Return ret