diff options
| -rw-r--r-- | fs/notify/fanotify/fanotify_user.c | 13 | 
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 919ff59cb802..8fca5ec442e4 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -158,9 +158,6 @@ static size_t fanotify_event_len(unsigned int info_mode,  	int fh_len;  	int dot_len = 0; -	if (!info_mode) -		return event_len; -  	if (fanotify_is_error_event(event->mask))  		event_len += FANOTIFY_ERROR_INFO_LEN; @@ -754,12 +751,10 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group,  	buf += FAN_EVENT_METADATA_LEN;  	count -= FAN_EVENT_METADATA_LEN; -	if (info_mode) { -		ret = copy_info_records_to_user(event, info, info_mode, pidfd, -						buf, count); -		if (ret < 0) -			goto out_close_fd; -	} +	ret = copy_info_records_to_user(event, info, info_mode, pidfd, +					buf, count); +	if (ret < 0) +		goto out_close_fd;  	if (f)  		fd_install(fd, f);  | 
