mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amy Griffis <amy.griffis@hp.com>
To: linux-kernel@vger.kernel.org
Cc: John McCutchan <ttb@tentacle.dhs.org>,
	Andrew Morton <akpm@osdl.org>,
	Nick Piggin <nickpiggin@yahoo.com.au>
Subject: [PATCH] inotify: IN_DELETE events missing in -mm
Date: Wed, 29 Mar 2006 10:57:19 -0500	[thread overview]
Message-ID: <20060329155719.GA22092@zk3.dec.com> (raw)

In recent -mm kernels (e.g. 2.6.16-mm1), IN_DELETE events are no longer 
generated for the removal of a file from a watched directory.

This seems to be a result of clearing DCACHE_INOTIFY_PARENT_WATCHED in
d_delete() directly before calling fsnotify_nameremove().

Assuming the flag doesn't need to be cleared before dentry_iput(), this should
do the trick.

Signed-off-by: Amy Griffis <amy.griffis@hp.com>

diff --git a/fs/dcache.c b/fs/dcache.c
index 363cd4b..344ce91 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1198,11 +1198,11 @@ void d_delete(struct dentry * dentry)
 	spin_lock(&dentry->d_lock);
 	isdir = S_ISDIR(dentry->d_inode->i_mode);
 	if (atomic_read(&dentry->d_count) == 1) {
-		/* remove this and other inotify debug checks after 2.6.18 */
-		dentry->d_flags &= ~DCACHE_INOTIFY_PARENT_WATCHED;
-
 		dentry_iput(dentry);
 		fsnotify_nameremove(dentry, isdir);
+
+		/* remove this and other inotify debug checks after 2.6.18 */
+		dentry->d_flags &= ~DCACHE_INOTIFY_PARENT_WATCHED;
 		return;
 	}
 

             reply	other threads:[~2006-03-29 15:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-29 15:57 Amy Griffis [this message]
     [not found] ` <1143668243.22134.29.camel@localhost.localdomain>
2006-03-29 21:37   ` John McCutchan
2006-03-30  1:51 ` Nick Piggin
2013-10-16 20:38 ` Jim Mostek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060329155719.GA22092@zk3.dec.com \
    --to=amy.griffis@hp.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=ttb@tentacle.dhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome