in_tail: inotify: double check if IN_ATTRIB is a file deletion
in_tail: inotify: double check if IN_ATTRIB is a file deletion

there some cases where unlink(2) triggers a IN_ATTRIB inotify
event (rm command), but also a chmod(2) triggers the same event
leading to a false file deletion.

This patch makes sure that when IN_ATTRIB event is received
checks the stat nlink of the file, if it's zero means it was
a real "deletion".

Signed-off-by: Eduardo Silva <81f705dc2ce1a61a2621e0e4b442a9474e1d0c70@treasure-data.com>

fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit