summaryrefslogtreecommitdiff
path: root/fs/notify/vfsmount_mark.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-03-15 11:33:58 +0300
committerJan Kara <jack@suse.cz>2017-04-10 18:37:35 +0300
commitf06fd98759451876f51607f60abd74c89b141610 (patch)
treedbdaa1e77b6c9f9e32119afc6c693d7efd53eb86 /fs/notify/vfsmount_mark.c
parenta242677bb1e6faa9bd82bd33afb2621071258231 (diff)
downloadlinux-f06fd98759451876f51607f60abd74c89b141610.tar.xz
fsnotify: Move locking into fsnotify_find_mark()
Move locking of a mark list into fsnotify_find_mark(). This reduces code churn in the following patch changing lock protecting the list. 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.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/notify/vfsmount_mark.c b/fs/notify/vfsmount_mark.c
index ffe0d7098cba..3476ee44b2c5 100644
--- a/fs/notify/vfsmount_mark.c
+++ b/fs/notify/vfsmount_mark.c
@@ -65,11 +65,6 @@ struct fsnotify_mark *fsnotify_find_vfsmount_mark(struct fsnotify_group *group,
struct vfsmount *mnt)
{
struct mount *m = real_mount(mnt);
- struct fsnotify_mark *mark;
- spin_lock(&mnt->mnt_root->d_lock);
- mark = fsnotify_find_mark(m->mnt_fsnotify_marks, group);
- spin_unlock(&mnt->mnt_root->d_lock);
-
- return mark;
+ return fsnotify_find_mark(m->mnt_fsnotify_marks, group);
}