Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207614
b: refs/heads/master
c: b4277d3
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris committed Jul 28, 2010
1 parent cc580f9 commit d0325b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a3aedbce416dfdbd5d5ac14a0edbcf21a62ee50
refs/heads/master: b4277d3dd5a7400c1ea7fd4e7d64bda8899f84f5
11 changes: 7 additions & 4 deletions trunk/fs/notify/notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static struct kmem_cache *fsnotify_event_holder_cachep;
* it is needed. It's refcnt is set 1 at kernel init time and will never
* get set to 0 so it will never get 'freed'
*/
static struct fsnotify_event q_overflow_event;
static struct fsnotify_event *q_overflow_event;
static atomic_t fsnotify_sync_cookie = ATOMIC_INIT(0);

/**
Expand Down Expand Up @@ -195,7 +195,7 @@ int fsnotify_add_notify_event(struct fsnotify_group *group, struct fsnotify_even
mutex_lock(&group->notification_mutex);

if (group->q_len >= group->max_events) {
event = &q_overflow_event;
event = q_overflow_event;
ret = -EOVERFLOW;
/* sorry, no private data on the overflow event */
priv = NULL;
Expand Down Expand Up @@ -412,8 +412,11 @@ __init int fsnotify_notification_init(void)
fsnotify_event_cachep = KMEM_CACHE(fsnotify_event, SLAB_PANIC);
fsnotify_event_holder_cachep = KMEM_CACHE(fsnotify_event_holder, SLAB_PANIC);

initialize_event(&q_overflow_event);
q_overflow_event.mask = FS_Q_OVERFLOW;
q_overflow_event = fsnotify_create_event(NULL, FS_Q_OVERFLOW, NULL,
FSNOTIFY_EVENT_NONE, NULL, 0,
GFP_KERNEL);
if (!q_overflow_event)
panic("unable to allocate fsnotify q_overflow_event\n");

return 0;
}
Expand Down

0 comments on commit d0325b7

Please sign in to comment.