|
@@ -252,20 +252,23 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
|
|
|
|
|
|
if (inode_group > vfsmount_group) {
|
|
if (inode_group > vfsmount_group) {
|
|
/* handle inode */
|
|
/* handle inode */
|
|
- send_to_group(to_tell, NULL, inode_mark, NULL, mask, data,
|
|
|
|
- data_is, cookie, file_name, &event);
|
|
|
|
|
|
+ ret = send_to_group(to_tell, NULL, inode_mark, NULL, mask, data,
|
|
|
|
+ data_is, cookie, file_name, &event);
|
|
/* we didn't use the vfsmount_mark */
|
|
/* we didn't use the vfsmount_mark */
|
|
vfsmount_group = NULL;
|
|
vfsmount_group = NULL;
|
|
} else if (vfsmount_group > inode_group) {
|
|
} else if (vfsmount_group > inode_group) {
|
|
- send_to_group(to_tell, mnt, NULL, vfsmount_mark, mask, data,
|
|
|
|
- data_is, cookie, file_name, &event);
|
|
|
|
|
|
+ ret = send_to_group(to_tell, mnt, NULL, vfsmount_mark, mask, data,
|
|
|
|
+ data_is, cookie, file_name, &event);
|
|
inode_group = NULL;
|
|
inode_group = NULL;
|
|
} else {
|
|
} else {
|
|
- send_to_group(to_tell, mnt, inode_mark, vfsmount_mark,
|
|
|
|
- mask, data, data_is, cookie, file_name,
|
|
|
|
- &event);
|
|
|
|
|
|
+ ret = send_to_group(to_tell, mnt, inode_mark, vfsmount_mark,
|
|
|
|
+ mask, data, data_is, cookie, file_name,
|
|
|
|
+ &event);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (ret && (mask & ALL_FSNOTIFY_PERM_EVENTS))
|
|
|
|
+ goto out;
|
|
|
|
+
|
|
if (inode_group)
|
|
if (inode_group)
|
|
inode_node = srcu_dereference(inode_node->next,
|
|
inode_node = srcu_dereference(inode_node->next,
|
|
&fsnotify_mark_srcu);
|
|
&fsnotify_mark_srcu);
|
|
@@ -273,7 +276,8 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
|
|
vfsmount_node = srcu_dereference(vfsmount_node->next,
|
|
vfsmount_node = srcu_dereference(vfsmount_node->next,
|
|
&fsnotify_mark_srcu);
|
|
&fsnotify_mark_srcu);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ ret = 0;
|
|
|
|
+out:
|
|
srcu_read_unlock(&fsnotify_mark_srcu, idx);
|
|
srcu_read_unlock(&fsnotify_mark_srcu, idx);
|
|
/*
|
|
/*
|
|
* fsnotify_create_event() took a reference so the event can't be cleaned
|
|
* fsnotify_create_event() took a reference so the event can't be cleaned
|