From: Jan Kara Date: Thu, 3 Apr 2014 21:46:36 +0000 (-0700) Subject: fanotify: move unrelated handling from copy_event_to_user() X-Git-Tag: v3.15-rc1~106^2~222 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d507816b58bebc8f9c1bed6a28affaf0729306e2;p=pandora-kernel.git fanotify: move unrelated handling from copy_event_to_user() Move code moving event structure to access_list from copy_event_to_user() to fanotify_read() where it is more logical (so that we can immediately see in the main loop that we either move the event to a different list or free it). Also move special error handling for permission events from copy_event_to_user() to the main loop to have it in one place with error handling for normal events. This makes copy_event_to_user() really only copy the event to user without any side effects. Signed-off-by: Jan Kara Cc: Eric Paris Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed