diff options
author | Eric Paris <eparis@redhat.com> | 2010-07-28 10:18:39 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 10:18:54 -0400 |
commit | 43709a288ed03aa0e2979ab63dd089b3889645c4 (patch) | |
tree | 71717ebf944c099af5ab8ea339889665d4b9ef67 /fs/notify/fanotify | |
parent | 03930979afa63e079e9aefd4d3dd429240711027 (diff) |
fsnotify: remove group->mask
group->mask is now useless. It was originally a shortcut for fsnotify to
save on performance. These checks are now redundant, so we remove them.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/fanotify')
-rw-r--r-- | fs/notify/fanotify/fanotify_user.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 50cea74bf1c8..25a3b4dfcf61 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c | |||
@@ -496,8 +496,6 @@ static int fanotify_remove_vfsmount_mark(struct fsnotify_group *group, | |||
496 | 496 | ||
497 | removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags); | 497 | removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags); |
498 | fsnotify_put_mark(fsn_mark); | 498 | fsnotify_put_mark(fsn_mark); |
499 | if (removed & group->mask) | ||
500 | fsnotify_recalc_group_mask(group); | ||
501 | if (removed & mnt->mnt_fsnotify_mask) | 499 | if (removed & mnt->mnt_fsnotify_mask) |
502 | fsnotify_recalc_vfsmount_mask(mnt); | 500 | fsnotify_recalc_vfsmount_mask(mnt); |
503 | 501 | ||
@@ -518,9 +516,6 @@ static int fanotify_remove_inode_mark(struct fsnotify_group *group, | |||
518 | removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags); | 516 | removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags); |
519 | /* matches the fsnotify_find_inode_mark() */ | 517 | /* matches the fsnotify_find_inode_mark() */ |
520 | fsnotify_put_mark(fsn_mark); | 518 | fsnotify_put_mark(fsn_mark); |
521 | |||
522 | if (removed & group->mask) | ||
523 | fsnotify_recalc_group_mask(group); | ||
524 | if (removed & inode->i_fsnotify_mask) | 519 | if (removed & inode->i_fsnotify_mask) |
525 | fsnotify_recalc_inode_mask(inode); | 520 | fsnotify_recalc_inode_mask(inode); |
526 | 521 | ||
@@ -572,12 +567,9 @@ static int fanotify_add_vfsmount_mark(struct fsnotify_group *group, | |||
572 | } | 567 | } |
573 | added = fanotify_mark_add_to_mask(fsn_mark, mask, flags); | 568 | added = fanotify_mark_add_to_mask(fsn_mark, mask, flags); |
574 | fsnotify_put_mark(fsn_mark); | 569 | fsnotify_put_mark(fsn_mark); |
575 | if (added) { | 570 | if (added & ~mnt->mnt_fsnotify_mask) |
576 | if (added & ~group->mask) | 571 | fsnotify_recalc_vfsmount_mask(mnt); |
577 | fsnotify_recalc_group_mask(group); | 572 | |
578 | if (added & ~mnt->mnt_fsnotify_mask) | ||
579 | fsnotify_recalc_vfsmount_mask(mnt); | ||
580 | } | ||
581 | return 0; | 573 | return 0; |
582 | } | 574 | } |
583 | 575 | ||
@@ -607,12 +599,8 @@ static int fanotify_add_inode_mark(struct fsnotify_group *group, | |||
607 | } | 599 | } |
608 | added = fanotify_mark_add_to_mask(fsn_mark, mask, flags); | 600 | added = fanotify_mark_add_to_mask(fsn_mark, mask, flags); |
609 | fsnotify_put_mark(fsn_mark); | 601 | fsnotify_put_mark(fsn_mark); |
610 | if (added) { | 602 | if (added & ~inode->i_fsnotify_mask) |
611 | if (added & ~group->mask) | 603 | fsnotify_recalc_inode_mask(inode); |
612 | fsnotify_recalc_group_mask(group); | ||
613 | if (added & ~inode->i_fsnotify_mask) | ||
614 | fsnotify_recalc_inode_mask(inode); | ||
615 | } | ||
616 | return 0; | 604 | return 0; |
617 | } | 605 | } |
618 | 606 | ||
@@ -734,7 +722,6 @@ SYSCALL_DEFINE(fanotify_mark)(int fanotify_fd, unsigned int flags, | |||
734 | fsnotify_clear_vfsmount_marks_by_group(group); | 722 | fsnotify_clear_vfsmount_marks_by_group(group); |
735 | else | 723 | else |
736 | fsnotify_clear_inode_marks_by_group(group); | 724 | fsnotify_clear_inode_marks_by_group(group); |
737 | fsnotify_recalc_group_mask(group); | ||
738 | break; | 725 | break; |
739 | default: | 726 | default: |
740 | ret = -EINVAL; | 727 | ret = -EINVAL; |