aboutsummaryrefslogtreecommitdiff
path: root/fs/notify/notification.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-07-28 10:18:37 -0400
committerEric Paris <eparis@redhat.com>2010-07-28 10:18:50 -0400
commit5ba08e2eeb06355f66ed62ae97bb87d145973a9a (patch)
tree4d0b26a125c8805234e0ebb58101bf1c5a75e61e /fs/notify/notification.c
parent80af2588676483ac4e998b5092e9d008dab3ab62 (diff)
fsnotify: add pr_debug throughout
It can be hard to debug fsnotify since there are so few printks. Use pr_debug to allow for dynamic debugging. Signed-off-by: Eric Paris <eparis@redhat.com>
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 b35faafacd3..e6dde25fb99 100644
--- a/fs/notify/notification.c
+++ b/fs/notify/notification.c
@@ -87,6 +87,8 @@ void fsnotify_put_event(struct fsnotify_event *event)
return;
if (atomic_dec_and_test(&event->refcnt)) {
+ pr_debug("%s: event=%p\n", __func__, event);
+
if (event->data_type == FSNOTIFY_EVENT_PATH)
path_put(&event->path);
@@ -146,6 +148,8 @@ int fsnotify_add_notify_event(struct fsnotify_group *group, struct fsnotify_even
struct list_head *list = &group->notification_list;
int rc = 0;
+ pr_debug("%s: group=%p event=%p priv=%p\n", __func__, group, event, priv);
+
/*
* There is one fsnotify_event_holder embedded inside each fsnotify_event.
* 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
BUG_ON(!mutex_is_locked(&group->notification_mutex));
+ pr_debug("%s: group=%p\n", __func__, group);
+
holder = list_first_entry(&group->notification_list, struct fsnotify_event_holder, event_list);
event = holder->event;
@@ -307,6 +313,8 @@ int fsnotify_replace_event(struct fsnotify_event_holder *old_holder,
SPINLOCK_NEW,
};
+ pr_debug("%s: old_event=%p new_event=%p\n", __func__, old_event, new_event);
+
/*
* if the new_event's embedded holder is in use someone
* 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)
if (!event)
return NULL;
+ pr_debug("%s: old_event=%p new_event=%p\n", __func__, old_event, event);
+
memcpy(event, old_event, sizeof(*event));
initialize_event(event);
@@ -379,6 +389,9 @@ struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask,
if (!event)
return NULL;
+ pr_debug("%s: event=%p to_tell=%p mask=%x data=%p data_type=%d\n",
+ __func__, event, to_tell, mask, data, data_type);
+
initialize_event(event);
if (name) {