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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/notify/notification.c b/fs/notify/notification.c
index b35faafacd38..e6dde25fb99b 100644
--- a/fs/notify/notification.c
+++ b/fs/notify/notification.c
@@ -87,6 +87,8 @@ void fsnotify_put_event(struct fsnotify_event *event)
87 return; 87 return;
88 88
89 if (atomic_dec_and_test(&event->refcnt)) { 89 if (atomic_dec_and_test(&event->refcnt)) {
90 pr_debug("%s: event=%p\n", __func__, event);
91
90 if (event->data_type == FSNOTIFY_EVENT_PATH) 92 if (event->data_type == FSNOTIFY_EVENT_PATH)
91 path_put(&event->path); 93 path_put(&event->path);
92 94
@@ -146,6 +148,8 @@ int fsnotify_add_notify_event(struct fsnotify_group *group, struct fsnotify_even
146 struct list_head *list = &group->notification_list; 148 struct list_head *list = &group->notification_list;
147 int rc = 0; 149 int rc = 0;
148 150
151 pr_debug("%s: group=%p event=%p priv=%p\n", __func__, group, event, priv);
152
149 /* 153 /*
150 * There is one fsnotify_event_holder embedded inside each fsnotify_event. 154 * There is one fsnotify_event_holder embedded inside each fsnotify_event.
151 * Check if we expect to be able to use that holder. If not alloc a new 155 * Check if we expect to be able to use that holder. If not alloc a new
@@ -222,6 +226,8 @@ struct fsnotify_event *fsnotify_remove_notify_event(struct fsnotify_group *group
222 226
223 BUG_ON(!mutex_is_locked(&group->notification_mutex)); 227 BUG_ON(!mutex_is_locked(&group->notification_mutex));
224 228
229 pr_debug("%s: group=%p\n", __func__, group);
230
225 holder = list_first_entry(&group->notification_list, struct fsnotify_event_holder, event_list); 231 holder = list_first_entry(&group->notification_list, struct fsnotify_event_holder, event_list);
226 232
227 event = holder->event; 233 event = holder->event;
@@ -307,6 +313,8 @@ int fsnotify_replace_event(struct fsnotify_event_holder *old_holder,
307 SPINLOCK_NEW, 313 SPINLOCK_NEW,
308 }; 314 };
309 315
316 pr_debug("%s: old_event=%p new_event=%p\n", __func__, old_event, new_event);
317
310 /* 318 /*
311 * if the new_event's embedded holder is in use someone 319 * if the new_event's embedded holder is in use someone
312 * screwed up and didn't give us a clean new event. 320 * screwed up and didn't give us a clean new event.
@@ -340,6 +348,8 @@ struct fsnotify_event *fsnotify_clone_event(struct fsnotify_event *old_event)
340 if (!event) 348 if (!event)
341 return NULL; 349 return NULL;
342 350
351 pr_debug("%s: old_event=%p new_event=%p\n", __func__, old_event, event);
352
343 memcpy(event, old_event, sizeof(*event)); 353 memcpy(event, old_event, sizeof(*event));
344 initialize_event(event); 354 initialize_event(event);
345 355
@@ -379,6 +389,9 @@ struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask,
379 if (!event) 389 if (!event)
380 return NULL; 390 return NULL;
381 391
392 pr_debug("%s: event=%p to_tell=%p mask=%x data=%p data_type=%d\n",
393 __func__, event, to_tell, mask, data, data_type);
394
382 initialize_event(event); 395 initialize_event(event);
383 396
384 if (name) { 397 if (name) {