aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/notification.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/notify/notification.c')
-rw-r--r--fs/notify/notification.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/notify/notification.c b/fs/notify/notification.c
index 066f1f988bac..7fc8d004084c 100644
--- a/fs/notify/notification.c
+++ b/fs/notify/notification.c
@@ -93,6 +93,7 @@ void fsnotify_put_event(struct fsnotify_event *event)
93 BUG_ON(!list_empty(&event->private_data_list)); 93 BUG_ON(!list_empty(&event->private_data_list));
94 94
95 kfree(event->file_name); 95 kfree(event->file_name);
96 put_pid(event->tgid);
96 kmem_cache_free(fsnotify_event_cachep, event); 97 kmem_cache_free(fsnotify_event_cachep, event);
97 } 98 }
98} 99}
@@ -346,6 +347,7 @@ struct fsnotify_event *fsnotify_clone_event(struct fsnotify_event *old_event)
346 return NULL; 347 return NULL;
347 } 348 }
348 } 349 }
350 event->tgid = get_pid(old_event->tgid);
349 if (event->data_type == FSNOTIFY_EVENT_PATH) 351 if (event->data_type == FSNOTIFY_EVENT_PATH)
350 path_get(&event->path); 352 path_get(&event->path);
351 353
@@ -385,6 +387,7 @@ struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask,
385 event->name_len = strlen(event->file_name); 387 event->name_len = strlen(event->file_name);
386 } 388 }
387 389
390 event->tgid = get_pid(task_tgid(current));
388 event->sync_cookie = cookie; 391 event->sync_cookie = cookie;
389 event->to_tell = to_tell; 392 event->to_tell = to_tell;
390 event->data_type = data_type; 393 event->data_type = data_type;