diff options
author | Jan Kara <jack@suse.cz> | 2017-03-15 11:48:11 +0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-04-10 18:37:35 +0300 |
commit | 8212a6097a720896b4cdbe516487ad47f4296599 (patch) | |
tree | c598677214226244c7db2b90be6f2715cfbf38eb /fs/notify/vfsmount_mark.c | |
parent | a03e2e4f078365428bb4317989cb5d1d6563cfe9 (diff) | |
download | linux-8212a6097a720896b4cdbe516487ad47f4296599.tar.xz |
fsnotify: Remove indirection from fsnotify_detach_mark()
fsnotify_detach_mark() calls fsnotify_destroy_inode_mark() or
fsnotify_destroy_vfsmount_mark() to remove mark from object list. These
two functions are however very similar and differ only in the lock they
use to protect the object list of marks. Simplify the code by removing
the indirection and removing mark from the object list in a common
function.
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/vfsmount_mark.c')
-rw-r--r-- | fs/notify/vfsmount_mark.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/fs/notify/vfsmount_mark.c b/fs/notify/vfsmount_mark.c index 3476ee44b2c5..26da5c209944 100644 --- a/fs/notify/vfsmount_mark.c +++ b/fs/notify/vfsmount_mark.c @@ -39,24 +39,6 @@ void fsnotify_recalc_vfsmount_mask(struct vfsmount *mnt) fsnotify_recalc_mask(real_mount(mnt)->mnt_fsnotify_marks); } -void fsnotify_destroy_vfsmount_mark(struct fsnotify_mark *mark) -{ - struct vfsmount *mnt = mark->connector->mnt; - struct mount *m = real_mount(mnt); - - BUG_ON(!mutex_is_locked(&mark->group->mark_mutex)); - assert_spin_locked(&mark->lock); - - spin_lock(&mnt->mnt_root->d_lock); - - hlist_del_init_rcu(&mark->obj_list); - mark->connector = NULL; - - spin_unlock(&mnt->mnt_root->d_lock); - - fsnotify_recalc_mask(m->mnt_fsnotify_marks); -} - /* * given a group and vfsmount, find the mark associated with that combination. * if found take a reference to that mark and return it, else return NULL |