fsnotify: allow addition of duplicate fsnotify marks
This patch allows a task to add a second fsnotify mark to an inode for the same group. This mark will be added to the end of the inode's list and this will never be found by the stand fsnotify_find_mark() function. This is useful if a user wants to add a new mark before removing the old one. Signed-off-by: Eric Paris <eparis@redhat.com>
This commit is contained in:
parent
9e1c74321d
commit
40554c3dae
5 changed files with 9 additions and 7 deletions
|
|
@ -161,7 +161,7 @@ static struct audit_parent *audit_init_parent(struct nameidata *ndp)
|
|||
|
||||
fsnotify_init_mark(&parent->mark, audit_watch_free_mark);
|
||||
parent->mark.mask = AUDIT_FS_WATCH;
|
||||
ret = fsnotify_add_mark(&parent->mark, audit_watch_group, inode);
|
||||
ret = fsnotify_add_mark(&parent->mark, audit_watch_group, inode, 0);
|
||||
if (ret < 0) {
|
||||
audit_free_parent(parent);
|
||||
return ERR_PTR(ret);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue