diff options
author | Jan Kara <jack@suse.cz> | 2017-03-14 16:11:23 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-04-10 17:37:35 +0200 |
commit | 755b5bc681eb46de7bfaec196f85e30efd95bd9f (patch) | |
tree | 1fc0f867ae0e8edf6f672f43ed8f86ab658197f0 /fs/notify/inode_mark.c | |
parent | e911d8af87dba7642138f4320ca3db80629989f2 (diff) | |
download | linux-755b5bc681eb46de7bfaec196f85e30efd95bd9f.tar.bz2 |
fsnotify: Remove indirection from mark list addition
Adding notification mark to object list has been currently done through
fsnotify_add_{inode|vfsmount}_mark() helpers from
fsnotify_add_mark_locked() which call fsnotify_add_mark_list(). Remove
this unnecessary indirection to simplify the code.
Pushing all the locking to fsnotify_add_mark_list() also allows us to
allocate the connector structure with GFP_KERNEL mode.
Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/inode_mark.c')
-rw-r--r-- | fs/notify/inode_mark.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index c3873b6920e7..87bef7d802db 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c @@ -92,31 +92,6 @@ struct fsnotify_mark *fsnotify_find_inode_mark(struct fsnotify_group *group, return mark; } -/* - * Attach an initialized mark to a given inode. - * These marks may be used for the fsnotify backend to determine which - * event types should be delivered to which group and for which inodes. These - * marks are ordered according to priority, highest number first, and then by - * the group's location in memory. - */ -int fsnotify_add_inode_mark(struct fsnotify_mark *mark, - struct fsnotify_group *group, struct inode *inode, - int allow_dups) -{ - int ret; - - BUG_ON(!mutex_is_locked(&group->mark_mutex)); - assert_spin_locked(&mark->lock); - - spin_lock(&inode->i_lock); - ret = fsnotify_add_mark_list(&inode->i_fsnotify_marks, mark, inode, - NULL, allow_dups); - inode->i_fsnotify_mask = fsnotify_recalc_mask(inode->i_fsnotify_marks); - spin_unlock(&inode->i_lock); - - return ret; -} - /** * fsnotify_unmount_inodes - an sb is unmounting. handle any watched inodes. * @sb: superblock being unmounted. |