lkml.org 
[lkml]   [2014]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] inotify.7: describe ambiguous behaviour of IN_DELETE_SELF
Date
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@openvz.org>
---
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


\
 
 \ /
  Last update: 2014-09-19 18:21    [W:0.698 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site