Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:async_helper() is used by almost all character device drivers* to set up the fasync queue, and for regular files by the file* lease code. It returns negative on error, 0 if it did no changes* and positive if it added/deleted the entry.

Proto:int fasync_helper(int fd, struct file *filp, int on, struct fasync_struct **fapp)

Type:int

Parameter:

TypeParameterName
intfd
struct file *filp
inton
struct fasync_struct **fapp
980  If Not on Then Return Remove a fasync entry. If successfully removed, return* positive and clear the FASYNC flag. If no entry exists,* do nothing and return 0.* NOTE! It is very important that the FASYNC flag always* match the state "is the filp on a fasync list".
982  Return Add a fasync entry. Return negative on error, positive if* added, and zero if did nothing but change an existing one.
Caller
NameDescribe
pipe_fasync
fsnotify_fasync
io_uring_fasync
lease_modifyWe already had a lease on this file; just change its type