函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\notify\inotify\inotify_user.c Create Date:2022-07-29 10:49:26
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:inotify_update_existing_watch

函数原型:static int inotify_update_existing_watch(struct fsnotify_group *group, struct inode *inode, unsigned int arg)

返回类型:int

参数:

类型参数名称
struct fsnotify_group *group
struct inode *inode
unsigned intarg
511  add等于arg按位与add to the mask of an already existing watch
512  create等于arg按位与ly create watches
515  mask等于inotify_arg_to_mask(arg)
517  fsn_mark等于Given a list of marks, find the mark associated with given group. If found* take a reference to that mark and return it, else return NULL.
518  如果非fsn_mark则返回:负ENOENT
520  否则如果create
521  ret等于负EEXIST
522  转到:out
525  i_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, structinotify_inode_mark, fsn_mark)
527  加自旋锁
528  old_mask等于 Mask this mark is for [mark->lock, group->mark_mutex]
529  如果add Mask this mark is for [mark->lock, group->mark_mutex] 或等于mask
531  否则 Mask this mark is for [mark->lock, group->mark_mutex] 等于mask
533  new_mask等于 Mask this mark is for [mark->lock, group->mark_mutex]
534  自旋锁解锁
536  如果old_mask不等于new_mask
538  dropped等于old_mask按位与new_mask的反
540  do_inode等于new_mask按位与i_fsnotify_mask的反
543  如果droppeddo_inodeCalculate 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.
549  ret等于wd
551  out :
553  fsnotify_put_mark(fsn_mark)
555  返回:ret
调用者
名称描述
inotify_update_watch