mirror of https://gitee.com/openkylin/linux.git
fsnotify: Rename fsnotify_clear_marks_by_group_flags()
The _flags() suffix in the function name was more confusing than explaining so just remove it. Also rename the argument from 'flags' to 'type' to better explain what the function expects. Reviewed-by: Miklos Szeredi <mszeredi@redhat.com> Suggested-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
416bcdbcbb
commit
18f2e0d3a4
|
@ -67,7 +67,7 @@
|
||||||
* - The fs the inode is on is unmounted. (fsnotify_inode_delete/fsnotify_unmount_inodes)
|
* - The fs the inode is on is unmounted. (fsnotify_inode_delete/fsnotify_unmount_inodes)
|
||||||
* - Something explicitly requests that it be removed. (fsnotify_destroy_mark)
|
* - Something explicitly requests that it be removed. (fsnotify_destroy_mark)
|
||||||
* - The fsnotify_group associated with the mark is going away and all such marks
|
* - The fsnotify_group associated with the mark is going away and all such marks
|
||||||
* need to be cleaned up. (fsnotify_clear_marks_by_group)
|
* need to be cleaned up. (fsnotify_detach_group_marks)
|
||||||
*
|
*
|
||||||
* This has the very interesting property of being able to run concurrently with
|
* This has the very interesting property of being able to run concurrently with
|
||||||
* any (or all) other directions.
|
* any (or all) other directions.
|
||||||
|
@ -645,11 +645,9 @@ struct fsnotify_mark *fsnotify_find_mark(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Clear any marks in a group with given type */
|
||||||
* clear any marks in a group in which mark->flags & flags is true
|
void fsnotify_clear_marks_by_group(struct fsnotify_group *group,
|
||||||
*/
|
unsigned int type)
|
||||||
void fsnotify_clear_marks_by_group_flags(struct fsnotify_group *group,
|
|
||||||
unsigned int flags)
|
|
||||||
{
|
{
|
||||||
struct fsnotify_mark *lmark, *mark;
|
struct fsnotify_mark *lmark, *mark;
|
||||||
LIST_HEAD(to_free);
|
LIST_HEAD(to_free);
|
||||||
|
@ -665,7 +663,7 @@ void fsnotify_clear_marks_by_group_flags(struct fsnotify_group *group,
|
||||||
*/
|
*/
|
||||||
mutex_lock_nested(&group->mark_mutex, SINGLE_DEPTH_NESTING);
|
mutex_lock_nested(&group->mark_mutex, SINGLE_DEPTH_NESTING);
|
||||||
list_for_each_entry_safe(mark, lmark, &group->marks_list, g_list) {
|
list_for_each_entry_safe(mark, lmark, &group->marks_list, g_list) {
|
||||||
if (mark->connector->flags & flags)
|
if (mark->connector->flags & type)
|
||||||
list_move(&mark->g_list, &to_free);
|
list_move(&mark->g_list, &to_free);
|
||||||
}
|
}
|
||||||
mutex_unlock(&group->mark_mutex);
|
mutex_unlock(&group->mark_mutex);
|
||||||
|
|
|
@ -356,16 +356,16 @@ extern void fsnotify_detach_mark(struct fsnotify_mark *mark);
|
||||||
/* free mark */
|
/* free mark */
|
||||||
extern void fsnotify_free_mark(struct fsnotify_mark *mark);
|
extern void fsnotify_free_mark(struct fsnotify_mark *mark);
|
||||||
/* run all the marks in a group, and clear all of the marks attached to given object type */
|
/* run all the marks in a group, and clear all of the marks attached to given object type */
|
||||||
extern void fsnotify_clear_marks_by_group_flags(struct fsnotify_group *group, unsigned int flags);
|
extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group, unsigned int type);
|
||||||
/* run all the marks in a group, and clear all of the vfsmount marks */
|
/* run all the marks in a group, and clear all of the vfsmount marks */
|
||||||
static inline void fsnotify_clear_vfsmount_marks_by_group(struct fsnotify_group *group)
|
static inline void fsnotify_clear_vfsmount_marks_by_group(struct fsnotify_group *group)
|
||||||
{
|
{
|
||||||
fsnotify_clear_marks_by_group_flags(group, FSNOTIFY_OBJ_TYPE_VFSMOUNT);
|
fsnotify_clear_marks_by_group(group, FSNOTIFY_OBJ_TYPE_VFSMOUNT);
|
||||||
}
|
}
|
||||||
/* run all the marks in a group, and clear all of the inode marks */
|
/* run all the marks in a group, and clear all of the inode marks */
|
||||||
static inline void fsnotify_clear_inode_marks_by_group(struct fsnotify_group *group)
|
static inline void fsnotify_clear_inode_marks_by_group(struct fsnotify_group *group)
|
||||||
{
|
{
|
||||||
fsnotify_clear_marks_by_group_flags(group, FSNOTIFY_OBJ_TYPE_INODE);
|
fsnotify_clear_marks_by_group(group, FSNOTIFY_OBJ_TYPE_INODE);
|
||||||
}
|
}
|
||||||
extern void fsnotify_get_mark(struct fsnotify_mark *mark);
|
extern void fsnotify_get_mark(struct fsnotify_mark *mark);
|
||||||
extern void fsnotify_put_mark(struct fsnotify_mark *mark);
|
extern void fsnotify_put_mark(struct fsnotify_mark *mark);
|
||||||
|
|
Loading…
Reference in New Issue