diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-17 21:24:33 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:59:00 -0400 |
commit | c908370fc1ac27fd7e1fc0f34c693047b26564ce (patch) | |
tree | 681cc398050764d04d34652c072790b8c1851d3e /fs | |
parent | e898386146deb49a0b45ff1887d9da149c003209 (diff) |
fsnotify: allow ignored_mask to survive modification
Some inodes a group may want to never hear about a set of events even if
the inode is modified. We add a new mark flag which indicates that these
marks should not have their ignored_mask cleared on modification.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/notify/fsnotify.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c index 3ad940d0bac1..54d58d5f72c1 100644 --- a/fs/notify/fsnotify.c +++ b/fs/notify/fsnotify.c | |||
@@ -148,7 +148,8 @@ void __fsnotify_flush_ignored_mask(struct inode *inode, void *data, int data_is) | |||
148 | if (!hlist_empty(&inode->i_fsnotify_marks)) { | 148 | if (!hlist_empty(&inode->i_fsnotify_marks)) { |
149 | spin_lock(&inode->i_lock); | 149 | spin_lock(&inode->i_lock); |
150 | hlist_for_each_entry(mark, node, &inode->i_fsnotify_marks, i.i_list) { | 150 | hlist_for_each_entry(mark, node, &inode->i_fsnotify_marks, i.i_list) { |
151 | mark->ignored_mask = 0; | 151 | if (!(mark->flags & FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY)) |
152 | mark->ignored_mask = 0; | ||
152 | } | 153 | } |
153 | spin_unlock(&inode->i_lock); | 154 | spin_unlock(&inode->i_lock); |
154 | } | 155 | } |
@@ -160,7 +161,8 @@ void __fsnotify_flush_ignored_mask(struct inode *inode, void *data, int data_is) | |||
160 | if (mnt && !hlist_empty(&mnt->mnt_fsnotify_marks)) { | 161 | if (mnt && !hlist_empty(&mnt->mnt_fsnotify_marks)) { |
161 | spin_lock(&mnt->mnt_root->d_lock); | 162 | spin_lock(&mnt->mnt_root->d_lock); |
162 | hlist_for_each_entry(mark, node, &mnt->mnt_fsnotify_marks, m.m_list) { | 163 | hlist_for_each_entry(mark, node, &mnt->mnt_fsnotify_marks, m.m_list) { |
163 | mark->ignored_mask = 0; | 164 | if (!(mark->flags & FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY)) |
165 | mark->ignored_mask = 0; | ||
164 | } | 166 | } |
165 | spin_unlock(&mnt->mnt_root->d_lock); | 167 | spin_unlock(&mnt->mnt_root->d_lock); |
166 | } | 168 | } |