summaryrefslogtreecommitdiff
path: root/fs/notify/vfsmount_mark.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-02-01 11:21:58 +0300
committerJan Kara <jack@suse.cz>2017-04-10 18:37:35 +0300
commit08991e83b7286635167bab40927665a90fb00d81 (patch)
treee82e62c0a92193ff3af83d3d1ea60f0430c5c118 /fs/notify/vfsmount_mark.c
parent04662cab59fc3e8421fd7a0539d304d51d2750a4 (diff)
downloadlinux-08991e83b7286635167bab40927665a90fb00d81.tar.xz
fsnotify: Free fsnotify_mark_connector when there is no mark attached
Currently we free fsnotify_mark_connector structure only when inode / vfsmount is getting freed. This can however impose noticeable memory overhead when marks get attached to inodes only temporarily. So free the connector structure once the last mark is detached from the object. Since notification infrastructure can be working with the connector under the protection of fsnotify_mark_srcu, we have to be careful and free the fsnotify_mark_connector only after SRCU period passes. 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/notify/vfsmount_mark.c b/fs/notify/vfsmount_mark.c
index 26da5c209944..dd5f3fcbccfb 100644
--- a/fs/notify/vfsmount_mark.c
+++ b/fs/notify/vfsmount_mark.c
@@ -48,5 +48,5 @@ struct fsnotify_mark *fsnotify_find_vfsmount_mark(struct fsnotify_group *group,
{
struct mount *m = real_mount(mnt);
- return fsnotify_find_mark(m->mnt_fsnotify_marks, group);
+ return fsnotify_find_mark(&m->mnt_fsnotify_marks, group);
}