• Jan Kara's avatar
    fsnotify: Let userspace know about lost events due to ENOMEM · 7b1f6417
    Jan Kara authored
    Currently if notification event is lost due to event allocation failing
    we ENOMEM, we just silently continue (except for fanotify permission
    events where we deny the access). This is undesirable as userspace has
    no way of knowing whether the notifications it got are complete or not.
    Treat lost events due to ENOMEM the same way as lost events due to queue
    overflow so that userspace knows something bad happened and it likely
    needs to rescan the filesystem.
    Reviewed-by: Amir Goldstein's avatarAmir Goldstein <amir73il@gmail.com>
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    7b1f6417
notification.c 6.72 KB