diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-21 19:28:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-21 19:28:28 -0400 |
commit | d995053d045d777e78ba7eba71a6a0733f3aa726 (patch) | |
tree | 35cb9e017f55034534b3fdf944e6f263785c49ac | |
parent | be8db0b843d4eef193e996c3e31aabf15b2d7004 (diff) | |
parent | 945526846a84c00adac1efd1c6befdaa77039623 (diff) |
Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify
* 'for-linus' of git://git.infradead.org/users/eparis/notify:
dnotify: ignore FS_EVENT_ON_CHILD
inotify: fix coalesce duplicate events into a single event in special case
inotify: deprecate the inotify kernel interface
fsnotify: do not set group for a mark before it is on the i_list
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 8 | ||||
-rw-r--r-- | fs/notify/dnotify/dnotify.c | 3 | ||||
-rw-r--r-- | fs/notify/inode_mark.c | 6 | ||||
-rw-r--r-- | fs/notify/notification.c | 2 |
4 files changed, 14 insertions, 5 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 04e6c819b28a..bc693fffabe0 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -418,6 +418,14 @@ When: 2.6.33 | |||
418 | Why: Should be implemented in userspace, policy daemon. | 418 | Why: Should be implemented in userspace, policy daemon. |
419 | Who: Johannes Berg <johannes@sipsolutions.net> | 419 | Who: Johannes Berg <johannes@sipsolutions.net> |
420 | 420 | ||
421 | --------------------------- | ||
422 | |||
423 | What: CONFIG_INOTIFY | ||
424 | When: 2.6.33 | ||
425 | Why: last user (audit) will be converted to the newer more generic | ||
426 | and more easily maintained fsnotify subsystem | ||
427 | Who: Eric Paris <eparis@redhat.com> | ||
428 | |||
421 | ---------------------------- | 429 | ---------------------------- |
422 | 430 | ||
423 | What: lock_policy_rwsem_* and unlock_policy_rwsem_* will not be | 431 | What: lock_policy_rwsem_* and unlock_policy_rwsem_* will not be |
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c index 828a889be909..7e54e52964dd 100644 --- a/fs/notify/dnotify/dnotify.c +++ b/fs/notify/dnotify/dnotify.c | |||
@@ -91,6 +91,7 @@ static int dnotify_handle_event(struct fsnotify_group *group, | |||
91 | struct dnotify_struct *dn; | 91 | struct dnotify_struct *dn; |
92 | struct dnotify_struct **prev; | 92 | struct dnotify_struct **prev; |
93 | struct fown_struct *fown; | 93 | struct fown_struct *fown; |
94 | __u32 test_mask = event->mask & ~FS_EVENT_ON_CHILD; | ||
94 | 95 | ||
95 | to_tell = event->to_tell; | 96 | to_tell = event->to_tell; |
96 | 97 | ||
@@ -106,7 +107,7 @@ static int dnotify_handle_event(struct fsnotify_group *group, | |||
106 | spin_lock(&entry->lock); | 107 | spin_lock(&entry->lock); |
107 | prev = &dnentry->dn; | 108 | prev = &dnentry->dn; |
108 | while ((dn = *prev) != NULL) { | 109 | while ((dn = *prev) != NULL) { |
109 | if ((dn->dn_mask & event->mask) == 0) { | 110 | if ((dn->dn_mask & test_mask) == 0) { |
110 | prev = &dn->dn_next; | 111 | prev = &dn->dn_next; |
111 | continue; | 112 | continue; |
112 | } | 113 | } |
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index c8a07c65482b..3165d85aada2 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c | |||
@@ -324,11 +324,11 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry, | |||
324 | spin_lock(&group->mark_lock); | 324 | spin_lock(&group->mark_lock); |
325 | spin_lock(&inode->i_lock); | 325 | spin_lock(&inode->i_lock); |
326 | 326 | ||
327 | entry->group = group; | ||
328 | entry->inode = inode; | ||
329 | |||
330 | lentry = fsnotify_find_mark_entry(group, inode); | 327 | lentry = fsnotify_find_mark_entry(group, inode); |
331 | if (!lentry) { | 328 | if (!lentry) { |
329 | entry->group = group; | ||
330 | entry->inode = inode; | ||
331 | |||
332 | hlist_add_head(&entry->i_list, &inode->i_fsnotify_mark_entries); | 332 | hlist_add_head(&entry->i_list, &inode->i_fsnotify_mark_entries); |
333 | list_add(&entry->g_list, &group->mark_entries); | 333 | list_add(&entry->g_list, &group->mark_entries); |
334 | 334 | ||
diff --git a/fs/notify/notification.c b/fs/notify/notification.c index 3816d5750dd5..b8bf53b4c108 100644 --- a/fs/notify/notification.c +++ b/fs/notify/notification.c | |||
@@ -143,7 +143,7 @@ static bool event_compare(struct fsnotify_event *old, struct fsnotify_event *new | |||
143 | /* remember, after old was put on the wait_q we aren't | 143 | /* remember, after old was put on the wait_q we aren't |
144 | * allowed to look at the inode any more, only thing | 144 | * allowed to look at the inode any more, only thing |
145 | * left to check was if the file_name is the same */ | 145 | * left to check was if the file_name is the same */ |
146 | if (old->name_len && | 146 | if (!old->name_len || |
147 | !strcmp(old->file_name, new->file_name)) | 147 | !strcmp(old->file_name, new->file_name)) |
148 | return true; | 148 | return true; |
149 | break; | 149 | break; |