diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-17 21:24:34 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:59:01 -0400 |
commit | cb2d429faf2cae62d3c51e28099a181d5fe8c244 (patch) | |
tree | 401bc8d85e7228f868775269e6d97c3150f9a3a7 /fs/notify/fanotify | |
parent | 4d92604cc90aa18bbbe0f6e23b7a9fdb612836d3 (diff) | |
download | linux-cb2d429faf2cae62d3c51e28099a181d5fe8c244.tar.gz linux-cb2d429faf2cae62d3c51e28099a181d5fe8c244.tar.bz2 linux-cb2d429faf2cae62d3c51e28099a181d5fe8c244.zip |
fsnotify: add group priorities
This introduces an ordering to fsnotify groups. With purely asynchronous
notification based "things" implementing fsnotify (inotify, dnotify) ordering
isn't particularly important. But if people want to use fsnotify for the
basis of sycronous notification or blocking notification ordering becomes
important.
eg. A Hierarchical Storage Management listener would need to get its event
before an AV scanner could get its event (since the HSM would need to
bring the data in for the AV scanner to scan.) Typically asynchronous notification
would want to run after the AV scanner made any relevant access decisions
so as to not send notification about an event that was denied.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/fanotify')
-rw-r--r-- | fs/notify/fanotify/fanotify_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 9fe760baf69f..84d3e2047de3 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -463,8 +463,6 @@ SYSCALL_DEFINE3(fanotify_init, unsigned int, flags, unsigned int, event_f_flags, if (event_f_flags) return -EINVAL; - if (priority) - return -EINVAL; if (!capable(CAP_SYS_ADMIN)) return -EACCES; @@ -483,6 +481,8 @@ SYSCALL_DEFINE3(fanotify_init, unsigned int, flags, unsigned int, event_f_flags, if (IS_ERR(group)) return PTR_ERR(group); + group->priority = priority; + fd = anon_inode_getfd("[fanotify]", &fanotify_fops, group, f_flags); if (fd < 0) goto out_put_group; |