Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:When a process starts or stops watching an inode the set of events which* dnotify cares about for that inode may change. This function runs the* list of everything receiving dnotify events about this directory and calculates* the set of all those events

Proto:static void dnotify_recalc_inode_mask(struct fsnotify_mark *fsn_mark)

Type:void

Parameter:

TypeParameterName
struct fsnotify_mark *fsn_mark
48  new_mask = 0
50  dn_mark = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(fsn_mark, structdnotify_mark, fsn_mark)
54  assert_spin_locked( & Protects inode / mnt pointers, flags, masks )
56  When dn != NULL cycle new_mask |= dn_mask & ~dnotify multishot
58  If Mask this mark is for [mark->lock, group->mark_mutex] == new_mask Then Return
60  Mask this mark is for [mark->lock, group->mark_mutex] = new_mask
62  Calculate mask of events for a list of marks. The caller must make sure* connector and connector->obj cannot disappear under us. Callers achieve* this by holding a mark->lock or mark->group->mark_mutex for a mark on this* list.
Caller
NameDescribe
dnotify_handle_eventMains fsnotify call where events are delivered to dnotify.* Find the dnotify mark on the relevant inode, run the list of dnotify structs* on that mark and determine which of them has expressed interest in receiving* events of this type
dnotify_flushCalled every time a file is closed. Looks first for a dnotify mark on the* inode. If one is found run all of the ->dn structures attached to that* mark for one relevant to this process closing the file and remove that* dnotify_struct
fcntl_dirnotifyWhen a process calls fcntl to attach a dnotify watch to a directory it ends* up here. Allocate both a mark for fsnotify to add and a dnotify_struct to be* attached to the fsnotify_mark.