Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:fsnotify_attach_connector_to_object

Proto:static int fsnotify_attach_connector_to_object(fsnotify_connp_t *connp, unsigned int type, __kernel_fsid_t *fsid)

Type:int

Parameter:

TypeParameterName
fsnotify_connp_t *connp
unsigned inttype
__kernel_fsid_t *fsid
476  struct inode * inode = NULL
479  conn = kmem_cache_alloc(fsnotify_mark_connector_cachep, GFP_KERNEL)
480  If Not conn Then Return -ENOMEM
482  Process spin lock initialization( & lock)
483  INIT_HLIST_HEAD( & list)
484  Type of object [lock] = type
485  Object pointer [lock] = connp
487  If fsid Then
488  fsid of filesystem containing object = fsid
489  flags [lock] = FSNOTIFY_CONN_FLAG_HAS_FSID
490  Else
491  val[0] = val[1] = 0
492  flags [lock] = 0
494  If Type of object [lock] == FSNOTIFY_OBJ_TYPE_INODE Then inode = igrab(fsnotify_conn_inode(conn))
500  If cmpxchg(connp, NULL, conn) Then
502  If inode Then put an inode
504  kmem_cache_free(fsnotify_mark_connector_cachep, conn)
507  Return 0
Caller
NameDescribe
fsnotify_add_mark_listAdd mark into proper place in given list of marks. These marks may be used* for the fsnotify backend to determine which event types should be delivered* to which group and for which inodes. These marks are ordered according to