aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-12-21 10:13:54 -0500
committerJan Kara <jack@suse.cz>2017-04-10 11:37:36 -0400
commit8920d2734d9a1b68e1b53d8c12b289773cdbd971 (patch)
treed906a78e76040d0929c709c8dd1ed5483fb79ab6
parent66d2b81bcb92c14b22a56a9ff936f2b40accc83c (diff)
fsnotify: Remove fsnotify_recalc_{inode|vfsmount}_mask()
These helpers are just very thin wrappers now. Remove them. Reviewed-by: Miklos Szeredi <mszeredi@redhat.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r--fs/notify/fanotify/fanotify_user.c8
-rw-r--r--fs/notify/inode_mark.c5
-rw-r--r--fs/notify/inotify/inotify_user.c2
-rw-r--r--fs/notify/vfsmount_mark.c5
-rw-r--r--include/linux/fsnotify_backend.h4
5 files changed, 5 insertions, 19 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index cf38a345032f..24fa3f24b9ad 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -542,7 +542,7 @@ static int fanotify_remove_vfsmount_mark(struct fsnotify_group *group,
542 removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags, 542 removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags,
543 &destroy_mark); 543 &destroy_mark);
544 if (removed & real_mount(mnt)->mnt_fsnotify_mask) 544 if (removed & real_mount(mnt)->mnt_fsnotify_mask)
545 fsnotify_recalc_vfsmount_mask(mnt); 545 fsnotify_recalc_mask(real_mount(mnt)->mnt_fsnotify_marks);
546 if (destroy_mark) 546 if (destroy_mark)
547 fsnotify_detach_mark(fsn_mark); 547 fsnotify_detach_mark(fsn_mark);
548 mutex_unlock(&group->mark_mutex); 548 mutex_unlock(&group->mark_mutex);
@@ -571,7 +571,7 @@ static int fanotify_remove_inode_mark(struct fsnotify_group *group,
571 removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags, 571 removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags,
572 &destroy_mark); 572 &destroy_mark);
573 if (removed & inode->i_fsnotify_mask) 573 if (removed & inode->i_fsnotify_mask)
574 fsnotify_recalc_inode_mask(inode); 574 fsnotify_recalc_mask(inode->i_fsnotify_marks);
575 if (destroy_mark) 575 if (destroy_mark)
576 fsnotify_detach_mark(fsn_mark); 576 fsnotify_detach_mark(fsn_mark);
577 mutex_unlock(&group->mark_mutex); 577 mutex_unlock(&group->mark_mutex);
@@ -656,7 +656,7 @@ static int fanotify_add_vfsmount_mark(struct fsnotify_group *group,
656 } 656 }
657 added = fanotify_mark_add_to_mask(fsn_mark, mask, flags); 657 added = fanotify_mark_add_to_mask(fsn_mark, mask, flags);
658 if (added & ~real_mount(mnt)->mnt_fsnotify_mask) 658 if (added & ~real_mount(mnt)->mnt_fsnotify_mask)
659 fsnotify_recalc_vfsmount_mask(mnt); 659 fsnotify_recalc_mask(real_mount(mnt)->mnt_fsnotify_marks);
660 mutex_unlock(&group->mark_mutex); 660 mutex_unlock(&group->mark_mutex);
661 661
662 fsnotify_put_mark(fsn_mark); 662 fsnotify_put_mark(fsn_mark);
@@ -693,7 +693,7 @@ static int fanotify_add_inode_mark(struct fsnotify_group *group,
693 } 693 }
694 added = fanotify_mark_add_to_mask(fsn_mark, mask, flags); 694 added = fanotify_mark_add_to_mask(fsn_mark, mask, flags);
695 if (added & ~inode->i_fsnotify_mask) 695 if (added & ~inode->i_fsnotify_mask)
696 fsnotify_recalc_inode_mask(inode); 696 fsnotify_recalc_mask(inode->i_fsnotify_marks);
697 mutex_unlock(&group->mark_mutex); 697 mutex_unlock(&group->mark_mutex);
698 698
699 fsnotify_put_mark(fsn_mark); 699 fsnotify_put_mark(fsn_mark);
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c
index b9370316727e..2188329da3c2 100644
--- a/fs/notify/inode_mark.c
+++ b/fs/notify/inode_mark.c
@@ -30,11 +30,6 @@
30 30
31#include "../internal.h" 31#include "../internal.h"
32 32
33void fsnotify_recalc_inode_mask(struct inode *inode)
34{
35 fsnotify_recalc_mask(inode->i_fsnotify_marks);
36}
37
38/* 33/*
39 * Given a group clear all of the inode marks associated with that group. 34 * Given a group clear all of the inode marks associated with that group.
40 */ 35 */
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 69739b26c7e4..b3b2a464a03c 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -529,7 +529,7 @@ static int inotify_update_existing_watch(struct fsnotify_group *group,
529 529
530 /* update the inode with this new fsn_mark */ 530 /* update the inode with this new fsn_mark */
531 if (dropped || do_inode) 531 if (dropped || do_inode)
532 fsnotify_recalc_inode_mask(inode); 532 fsnotify_recalc_mask(inode->i_fsnotify_marks);
533 533
534 } 534 }
535 535
diff --git a/fs/notify/vfsmount_mark.c b/fs/notify/vfsmount_mark.c
index dd5f3fcbccfb..41bff46576c2 100644
--- a/fs/notify/vfsmount_mark.c
+++ b/fs/notify/vfsmount_mark.c
@@ -34,11 +34,6 @@ void fsnotify_clear_vfsmount_marks_by_group(struct fsnotify_group *group)
34 fsnotify_clear_marks_by_group_flags(group, FSNOTIFY_OBJ_TYPE_VFSMOUNT); 34 fsnotify_clear_marks_by_group_flags(group, FSNOTIFY_OBJ_TYPE_VFSMOUNT);
35} 35}
36 36
37void fsnotify_recalc_vfsmount_mask(struct vfsmount *mnt)
38{
39 fsnotify_recalc_mask(real_mount(mnt)->mnt_fsnotify_marks);
40}
41
42/* 37/*
43 * given a group and vfsmount, find the mark associated with that combination. 38 * given a group and vfsmount, find the mark associated with that combination.
44 * if found take a reference to that mark and return it, else return NULL 39 * if found take a reference to that mark and return it, else return NULL
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 63354cd86a7b..6d09c6ff9810 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -338,10 +338,6 @@ extern struct fsnotify_event *fsnotify_remove_first_event(struct fsnotify_group
338 338
339/* Calculate mask of events for a list of marks */ 339/* Calculate mask of events for a list of marks */
340extern void fsnotify_recalc_mask(struct fsnotify_mark_connector *conn); 340extern void fsnotify_recalc_mask(struct fsnotify_mark_connector *conn);
341/* run all marks associated with a vfsmount and update mnt->mnt_fsnotify_mask */
342extern void fsnotify_recalc_vfsmount_mask(struct vfsmount *mnt);
343/* run all marks associated with an inode and update inode->i_fsnotify_mask */
344extern void fsnotify_recalc_inode_mask(struct inode *inode);
345extern void fsnotify_init_mark(struct fsnotify_mark *mark, void (*free_mark)(struct fsnotify_mark *mark)); 341extern void fsnotify_init_mark(struct fsnotify_mark *mark, void (*free_mark)(struct fsnotify_mark *mark));
346/* find (and take a reference) to a mark associated with group and inode */ 342/* find (and take a reference) to a mark associated with group and inode */
347extern struct fsnotify_mark *fsnotify_find_inode_mark(struct fsnotify_group *group, struct inode *inode); 343extern struct fsnotify_mark *fsnotify_find_inode_mark(struct fsnotify_group *group, struct inode *inode);