summaryrefslogtreecommitdiff
path: root/fs/notify
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-12-17 21:24:33 -0500
committerEric Paris <eparis@redhat.com>2010-07-28 09:59:00 -0400
commitc9778a98e7440fb73e0d27b8155a688663a0d493 (patch)
tree838acd5f9438661015c32211d487ef618807a798 /fs/notify
parentc908370fc1ac27fd7e1fc0f34c693047b26564ce (diff)
downloadlinux-3.10-c9778a98e7440fb73e0d27b8155a688663a0d493.tar.gz
linux-3.10-c9778a98e7440fb73e0d27b8155a688663a0d493.tar.bz2
linux-3.10-c9778a98e7440fb73e0d27b8155a688663a0d493.zip
fanotify: allow ignored_masks to survive modify
Some users may want to truely ignore an inode even if it has been modified. Say you are wanting a mount which contains a log file and you really don't want any notification about that file. This patch allows the listener to do that. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify')
-rw-r--r--fs/notify/fanotify/fanotify_user.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index ad02d475770..3e275f17e7b 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -375,6 +375,8 @@ static __u32 fanotify_mark_add_to_mask(struct fsnotify_mark *fsn_mark,
} else {
oldmask = fsn_mark->ignored_mask;
fsnotify_set_mark_ignored_mask_locked(fsn_mark, (oldmask | mask));
+ if (flags & FAN_MARK_IGNORED_SURV_MODIFY)
+ fsn_mark->flags |= FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY;
}
spin_unlock(&fsn_mark->lock);