[PATCH] inotify.7: describe ambiguous behaviour of IN_DELETE_SELF

From: Andrey Vagin
Date: Fri Sep 19 2014 - 11:56:50 EST


Since kernel 3.18, IN_DELETE_SELF occurs only if nobody uses an object.
Before, if we have two hardlinks where one of them is opened and we
delete the opened file before the second one, we receive
IN_DELETE_SELF. It's wrong, because the file remains opened. If files
are deleted in another order, we don't receive IN_DELETE_SELF as expected.

This patch can be committed only after the kernel patch:
"[PATCH] fs: don't remove inotify watchers from alive inode-s (v2)"

Signed-off-by: Andrey Vagin <avagin@xxxxxxxxxx>
---
man7/inotify.7 | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/man7/inotify.7 b/man7/inotify.7
index e1cabe2..b7a6e2f 100644
--- a/man7/inotify.7
+++ b/man7/inotify.7
@@ -504,6 +504,19 @@ if the older had not yet been read)
instead checked if the most recent event could be coalesced with the
.I oldest
unread event.
+
+Since kernel 3.18,
+.\" commit XXXXXX
+.B IN_DELETE_SELF
+occurs only if nobody uses an object. Before, if we have two hardlinks where
+one of them is opened and we delete the opened file before the second one, we
+receive
+.B IN_DELETE_SELF.
+It's wrong, because the file remains opened. If files are deleted in another
+order, we don't receive
+.B IN_DELETE_SELF
+as expected.
+
.SH SEE ALSO
.BR inotifywait (1),
.BR inotifywatch (1),
--
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/