summaryrefslogtreecommitdiffstats
path: root/fs/notify/fanotify
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-07-28 10:18:39 -0400
committerEric Paris <eparis@redhat.com>2010-07-28 10:18:54 -0400
commit43709a288ed03aa0e2979ab63dd089b3889645c4 (patch)
tree71717ebf944c099af5ab8ea339889665d4b9ef67 /fs/notify/fanotify
parent03930979afa63e079e9aefd4d3dd429240711027 (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.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index 50cea74bf1c..25a3b4dfcf6 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,
removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags);
fsnotify_put_mark(fsn_mark);
- if (removed & group->mask)
- fsnotify_recalc_group_mask(group);
if (removed & mnt->mnt_fsnotify_mask)
fsnotify_recalc_vfsmount_mask(mnt);
@@ -518,9 +516,6 @@ static int fanotify_remove_inode_mark(struct fsnotify_group *group,
removed = fanotify_mark_remove_from_mask(fsn_mark, mask, flags);
/* matches the fsnotify_find_inode_mark() */
fsnotify_put_mark(fsn_mark);
-
- if (removed & group->mask)
- fsnotify_recalc_group_mask(group);
if (removed & inode->i_fsnotify_mask)
fsnotify_recalc_inode_mask(inode);
@@ -572,12 +567,9 @@ static int fanotify_add_vfsmount_mark(struct fsnotify_group *group,
}
added = fanotify_mark_add_to_mask(fsn_mark, mask, flags);
fsnotify_put_mark(fsn_mark);
- if (added) {
- if (added & ~group->mask)
- fsnotify_recalc_group_mask(group);
- if (added & ~mnt->mnt_fsnotify_mask)
- fsnotify_recalc_vfsmount_mask(mnt);
- }
+ if (added & ~mnt->mnt_fsnotify_mask)
+ fsnotify_recalc_vfsmount_mask(mnt);
+
return 0;
}
@@ -607,12 +599,8 @@ static int fanotify_add_inode_mark(struct fsnotify_group *group,
}
added = fanotify_mark_add_to_mask(fsn_mark, mask, flags);
fsnotify_put_mark(fsn_mark);
- if (added) {
- if (added & ~group->mask)
- fsnotify_recalc_group_mask(group);
- if (added & ~inode->i_fsnotify_mask)
- fsnotify_recalc_inode_mask(inode);
- }
+ if (added & ~inode->i_fsnotify_mask)
+ fsnotify_recalc_inode_mask(inode);
return 0;
}
@@ -734,7 +722,6 @@ SYSCALL_DEFINE(fanotify_mark)(int fanotify_fd, unsigned int flags,
fsnotify_clear_vfsmount_marks_by_group(group);
else
fsnotify_clear_inode_marks_by_group(group);
- fsnotify_recalc_group_mask(group);
break;
default:
ret = -EINVAL;