Function report |
Source Code:fs\notify\dnotify\dnotify.c |
Create Date:2022-07-28 20:17:10 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:When 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.
Proto:int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
int | fd | |
struct file * | filp | |
unsigned long | arg |
261 | new_fsn_mark = NULL |
262 | dn = NULL |
264 | If Not dir_notify_enable Then |
270 | If (arg & ~Don't remove notifier ) == 0 Then |
277 | inode = file_inode(filp) |
289 | error = security_path_notify( & f_path, mask, FSNOTIFY_OBJ_TYPE_INODE) |
296 | If Not dn Then |
303 | If Not new_dn_mark Then |
309 | new_fsn_mark = fsn_mark |
312 | dn = NULL |
315 | mutex_lock( & protect marks_list ) |
318 | 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. |
319 | If fsn_mark Then |
322 | Else |
323 | error = fsnotify_add_inode_mark_locked(new_fsn_mark, inode, 0) |
324 | If error Then |
326 | Go to out_err |
329 | fsn_mark = new_fsn_mark |
330 | dn_mark = new_dn_mark |
332 | new_fsn_mark = NULL |
357 | __f_setown(filp, task_pid(current process), PIDTYPE_TGID, 0) |
369 | out : |
375 | If destroy Then Free fsnotify mark |
378 | out_err : |
379 | If new_fsn_mark Then fsnotify_put_mark(new_fsn_mark) |
381 | If dn Then kmem_cache_free(dnotify_struct_cache, dn) |
383 | Return error |
Name | Describe |
---|---|
do_fcntl |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |