Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:inotify_new_group

Proto:static struct fsnotify_group *inotify_new_group(unsigned int max_events)

Type:struct fsnotify_group

Parameter:

TypeParameterName
unsigned intmax_events
628  group = Create a new fsnotify_group and hold a reference for the group returned.
629  If IS_ERR(group) Then Return group
632  oevent = Allocation memory
633  If Value for the false possibility is greater at compile time(!oevent) Then
634  Trying to get rid of a group. Remove all marks, flush all events and release* the group reference.* Note that another thread calling fsnotify_clear_marks_by_group() may still* hold a ref to the group.
635  Return ERR_PTR( - ENOMEM)
637  Event we queue when the * notification list is too * full = fse
638  fsnotify_init_event( Event we queue when the * notification list is too * full , NULL)
639  mask = Event queued overflowed
640  wd = -1
641  sync_cookie = 0
642  name_len = 0
644  maximum events allowed on the list = max_events
645  memcg to charge allocations = get_mem_cgroup_from_mm: Obtain a reference on given mm_struct's memcg.*@mm: mm from which memcg should be extracted. It can be NULL.* Obtain a reference on mm->memcg and returns it if successful. Otherwise* root_mem_cgroup is returned
647  Process spin lock initialization( & idr_lock)
648  dr_init() - Initialise an IDR.*@idr: IDR handle.* Initialise a dynamically allocated IDR. To initialise a* statically allocated IDR, use DEFINE_IDR().
649  ucounts = inc_ucount(current_user_ns(), current_euid(), UCOUNT_INOTIFY_INSTANCES)
653  If Not ucounts Then
654  Trying to get rid of a group. Remove all marks, flush all events and release* the group reference.* Note that another thread calling fsnotify_clear_marks_by_group() may still* hold a ref to the group.
655  Return ERR_PTR( - EMFILE)
658  Return group
Caller
NameDescribe
do_inotify_inity syscalls