summaryrefslogtreecommitdiff
path: root/fs/notify/vfsmount_mark.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-03-14 16:29:35 +0300
committerJan Kara <jack@suse.cz>2017-04-10 18:37:35 +0300
commit86ffe245c430f07f95d5d28d3b694ea72f4492e7 (patch)
tree91f46db0135cc58cfb5dd1114962bc4781c456fe /fs/notify/vfsmount_mark.c
parent9dd813c15b2c101168808d4f5941a29985758973 (diff)
downloadlinux-86ffe245c430f07f95d5d28d3b694ea72f4492e7.tar.xz
fsnotify: Move object pointer to fsnotify_mark_connector
Move pointer to inode / vfsmount from mark itself to the fsnotify_mark_connector structure. This is another step on the path towards decoupling inode / vfsmount lifetime from notification mark lifetime. 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.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/notify/vfsmount_mark.c b/fs/notify/vfsmount_mark.c
index 28815d5cba7c..e04e33ef02d4 100644
--- a/fs/notify/vfsmount_mark.c
+++ b/fs/notify/vfsmount_mark.c
@@ -31,7 +31,7 @@
void fsnotify_clear_vfsmount_marks_by_group(struct fsnotify_group *group)
{
- fsnotify_clear_marks_by_group_flags(group, FSNOTIFY_MARK_FLAG_VFSMOUNT);
+ fsnotify_clear_marks_by_group_flags(group, FSNOTIFY_OBJ_TYPE_VFSMOUNT);
}
/*
@@ -49,7 +49,7 @@ void fsnotify_recalc_vfsmount_mask(struct vfsmount *mnt)
void fsnotify_destroy_vfsmount_mark(struct fsnotify_mark *mark)
{
- struct vfsmount *mnt = mark->mnt;
+ struct vfsmount *mnt = mark->connector->mnt;
struct mount *m = real_mount(mnt);
BUG_ON(!mutex_is_locked(&mark->group->mark_mutex));
@@ -58,7 +58,7 @@ void fsnotify_destroy_vfsmount_mark(struct fsnotify_mark *mark)
spin_lock(&mnt->mnt_root->d_lock);
hlist_del_init_rcu(&mark->obj_list);
- mark->mnt = NULL;
+ mark->connector = NULL;
m->mnt_fsnotify_mask = fsnotify_recalc_mask(m->mnt_fsnotify_marks);
spin_unlock(&mnt->mnt_root->d_lock);
@@ -93,14 +93,12 @@ int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark,
struct mount *m = real_mount(mnt);
int ret;
- mark->flags |= FSNOTIFY_MARK_FLAG_VFSMOUNT;
-
BUG_ON(!mutex_is_locked(&group->mark_mutex));
assert_spin_locked(&mark->lock);
spin_lock(&mnt->mnt_root->d_lock);
- mark->mnt = mnt;
- ret = fsnotify_add_mark_list(&m->mnt_fsnotify_marks, mark, allow_dups);
+ ret = fsnotify_add_mark_list(&m->mnt_fsnotify_marks, mark, NULL, mnt,
+ allow_dups);
m->mnt_fsnotify_mask = fsnotify_recalc_mask(m->mnt_fsnotify_marks);
spin_unlock(&mnt->mnt_root->d_lock);