Fanotify processes only path events (fanotify_should_send_event() refuses any other event) so checking whether event is a path event during initialization makes no sense. Signed-off-by: Jan Kara <jack@xxxxxxx> --- fs/notify/fanotify/fanotify.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index 6c5369f0f78c..3c40f9685453 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c @@ -166,13 +166,8 @@ static struct fanotify_event_info *alloc_event(struct inode *inode, u32 mask, init: __maybe_unused fsnotify_init_event(&event->fse, inode, mask); event->tgid = get_pid(task_tgid(current)); - if (data_type == FSNOTIFY_EVENT_PATH) { - event->path = *path; - path_get(&event->path); - } else { - event->path.mnt = NULL; - event->path.dentry = NULL; - } + event->path = *path; + path_get(&event->path); return event; } -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html