diff options
author | Eric Paris <eparis@redhat.com> | 2010-10-28 17:21:56 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-10-28 17:22:13 -0400 |
commit | 6ad2d4e3e97ee4bfde0b45e8dfe37911330fc4aa (patch) | |
tree | 6a4b98f659a886147088a983170fa75e5113f017 /fs/notify/vfsmount_mark.c | |
parent | 9343919c1495b085a4a1cf4cbada8d7888daf099 (diff) | |
download | kernel_samsung_smdk4412-6ad2d4e3e97ee4bfde0b45e8dfe37911330fc4aa.tar.gz kernel_samsung_smdk4412-6ad2d4e3e97ee4bfde0b45e8dfe37911330fc4aa.tar.bz2 kernel_samsung_smdk4412-6ad2d4e3e97ee4bfde0b45e8dfe37911330fc4aa.zip |
fsnotify: implement ordering between notifiers
fanotify needs to be able to specify that some groups get events before
others. They use this idea to make sure that a hierarchical storage
manager gets access to files before programs which actually use them. This
is purely infrastructure. Everything will have a priority of 0, but the
infrastructure will exist for it to be non-zero.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/vfsmount_mark.c')
-rw-r--r-- | fs/notify/vfsmount_mark.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/notify/vfsmount_mark.c b/fs/notify/vfsmount_mark.c index 56772b578fb..85eebff6d0d 100644 --- a/fs/notify/vfsmount_mark.c +++ b/fs/notify/vfsmount_mark.c @@ -169,7 +169,11 @@ int fsnotify_add_vfsmount_mark(struct fsnotify_mark *mark, goto out; } - if (mark->group < lmark->group) + if (mark->group->priority < lmark->group->priority) + continue; + + if ((mark->group->priority == lmark->group->priority) && + (mark->group < lmark->group)) continue; hlist_add_before_rcu(&mark->m.m_list, &lmark->m.m_list); |