Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223365
b: refs/heads/master
c: 7d13162
h: refs/heads/master
i:
  223363: bdf37e9
v: v3
  • Loading branch information
Eric Paris committed Dec 15, 2010
1 parent 699f5e4 commit 56af502
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 62731fa0c893515dc6cbc3e0a2879a92793c735f
refs/heads/master: 7d13162332f2b67a941d18cee20f1c0413e020de
6 changes: 4 additions & 2 deletions trunk/fs/notify/fanotify/fanotify_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ static int fill_event_metadata(struct fsnotify_group *group,
group, metadata, event);

metadata->event_len = FAN_EVENT_METADATA_LEN;
metadata->metadata_len = FAN_EVENT_METADATA_LEN;
metadata->vers = FANOTIFY_METADATA_VERSION;
metadata->mask = event->mask & FAN_ALL_OUTGOING_EVENTS;
metadata->pid = pid_vnr(event->tgid);
Expand Down Expand Up @@ -275,10 +276,11 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group,
goto out_close_fd;

ret = -EFAULT;
if (copy_to_user(buf, &fanotify_event_metadata, FAN_EVENT_METADATA_LEN))
if (copy_to_user(buf, &fanotify_event_metadata,
fanotify_event_metadata.event_len))
goto out_kill_access_response;

return FAN_EVENT_METADATA_LEN;
return fanotify_event_metadata.event_len;

out_kill_access_response:
remove_access_response(group, event, fd);
Expand Down

0 comments on commit 56af502

Please sign in to comment.