fanotify: fix -EOVERFLOW with large files on 64-bit
[firefly-linux-kernel-4.4.55.git] / fs / notify / fanotify / fanotify_user.c
index 4e565c814309d2637c7d9bb8081f03a4d19216d0..732648b270dc1072f679b550fb386147e65b5db0 100644 (file)
@@ -698,6 +698,8 @@ SYSCALL_DEFINE2(fanotify_init, unsigned int, flags, unsigned int, event_f_flags)
        }
        group->overflow_event = &oevent->fse;
 
+       if (force_o_largefile())
+               event_f_flags |= O_LARGEFILE;
        group->fanotify_data.f_flags = event_f_flags;
 #ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS
        spin_lock_init(&group->fanotify_data.access_lock);