diff options
author | Eric Paris <eparis@redhat.com> | 2010-07-28 10:18:37 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 10:18:50 -0400 |
commit | 5ba08e2eeb06355f66ed62ae97bb87d145973a9a (patch) | |
tree | 4d0b26a125c8805234e0ebb58101bf1c5a75e61e /fs/notify/inotify/inotify_user.c | |
parent | 80af2588676483ac4e998b5092e9d008dab3ab62 (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/inotify/inotify_user.c')
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 7dc940c869b6..1068e1ca9cb0 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -141,6 +141,8 @@ static struct fsnotify_event *get_one_event(struct fsnotify_group *group, | |||
141 | 141 | ||
142 | event = fsnotify_peek_notify_event(group); | 142 | event = fsnotify_peek_notify_event(group); |
143 | 143 | ||
144 | pr_debug("%s: group=%p event=%p\n", __func__, group, event); | ||
145 | |||
144 | if (event->name_len) | 146 | if (event->name_len) |
145 | event_size += roundup(event->name_len + 1, event_size); | 147 | event_size += roundup(event->name_len + 1, event_size); |
146 | 148 | ||
@@ -170,6 +172,8 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group, | |||
170 | size_t event_size = sizeof(struct inotify_event); | 172 | size_t event_size = sizeof(struct inotify_event); |
171 | size_t name_len = 0; | 173 | size_t name_len = 0; |
172 | 174 | ||
175 | pr_debug("%s: group=%p event=%p\n", __func__, group, event); | ||
176 | |||
173 | /* we get the inotify watch descriptor from the event private data */ | 177 | /* we get the inotify watch descriptor from the event private data */ |
174 | spin_lock(&event->lock); | 178 | spin_lock(&event->lock); |
175 | fsn_priv = fsnotify_remove_priv_from_event(group, event); | 179 | fsn_priv = fsnotify_remove_priv_from_event(group, event); |
@@ -242,6 +246,8 @@ static ssize_t inotify_read(struct file *file, char __user *buf, | |||
242 | kevent = get_one_event(group, count); | 246 | kevent = get_one_event(group, count); |
243 | mutex_unlock(&group->notification_mutex); | 247 | mutex_unlock(&group->notification_mutex); |
244 | 248 | ||
249 | pr_debug("%s: group=%p kevent=%p\n", __func__, group, kevent); | ||
250 | |||
245 | if (kevent) { | 251 | if (kevent) { |
246 | ret = PTR_ERR(kevent); | 252 | ret = PTR_ERR(kevent); |
247 | if (IS_ERR(kevent)) | 253 | if (IS_ERR(kevent)) |
@@ -286,6 +292,8 @@ static int inotify_release(struct inode *ignored, struct file *file) | |||
286 | struct fsnotify_group *group = file->private_data; | 292 | struct fsnotify_group *group = file->private_data; |
287 | struct user_struct *user = group->inotify_data.user; | 293 | struct user_struct *user = group->inotify_data.user; |
288 | 294 | ||
295 | pr_debug("%s: group=%p\n", __func__, group); | ||
296 | |||
289 | fsnotify_clear_marks_by_group(group); | 297 | fsnotify_clear_marks_by_group(group); |
290 | 298 | ||
291 | /* free this group, matching get was inotify_init->fsnotify_obtain_group */ | 299 | /* free this group, matching get was inotify_init->fsnotify_obtain_group */ |
@@ -309,6 +317,8 @@ static long inotify_ioctl(struct file *file, unsigned int cmd, | |||
309 | group = file->private_data; | 317 | group = file->private_data; |
310 | p = (void __user *) arg; | 318 | p = (void __user *) arg; |
311 | 319 | ||
320 | pr_debug("%s: group=%p cmd=%u\n", __func__, group, cmd); | ||
321 | |||
312 | switch (cmd) { | 322 | switch (cmd) { |
313 | case FIONREAD: | 323 | case FIONREAD: |
314 | mutex_lock(&group->notification_mutex); | 324 | mutex_lock(&group->notification_mutex); |