Skip to content

Commit 217663f

Browse files
Yang Lijankara
authored andcommitted
fanotify: remove variable set but not used
The code that uses the pointer info has been removed in 7326e38 ("fanotify: report old and/or new parent+name in FAN_RENAME event"). and fanotify_event_info() doesn't change 'event', so the declaration and assignment of info can be removed. Eliminate the following clang warning: fs/notify/fanotify/fanotify_user.c:161:24: warning: variable ‘info’ set but not used Reported-by: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Signed-off-by: Jan Kara <[email protected]>
1 parent fa2e1ba commit 217663f

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

fs/notify/fanotify/fanotify_user.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ static size_t fanotify_event_len(unsigned int info_mode,
151151
struct fanotify_event *event)
152152
{
153153
size_t event_len = FAN_EVENT_METADATA_LEN;
154-
struct fanotify_info *info;
155154
int fh_len;
156155
int dot_len = 0;
157156

@@ -161,8 +160,6 @@ static size_t fanotify_event_len(unsigned int info_mode,
161160
if (fanotify_is_error_event(event->mask))
162161
event_len += FANOTIFY_ERROR_INFO_LEN;
163162

164-
info = fanotify_event_info(event);
165-
166163
if (fanotify_event_has_any_dir_fh(event)) {
167164
event_len += fanotify_dir_name_info_len(event);
168165
} else if ((info_mode & FAN_REPORT_NAME) &&

0 commit comments

Comments
 (0)