From: Robert Love <rml@novell.com>
To: Linus Torvalds <torvalds@osdl.org>,
John McCutchan <ttb@tentacle.dhs.org>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, jim.houston@ccur.com
Subject: [patch] inotify: idr_get_new_above not working?
Date: Mon, 15 Aug 2005 12:27:54 -0400 [thread overview]
Message-ID: <1124123274.23297.122.camel@betsy> (raw)
In-Reply-To: <1124115406.7369.6.camel@vertex>
On Mon, 2005-08-15 at 10:16 -0400, John McCutchan wrote:
> Inotify is using idr_get_new_above to make sure that the next watch
> descriptor is larger/different than any of the previous watch
> descriptors. We keep track of the largest wd that we get out of
> idr_get_new_above, and pass that to idr_get_new_above. I have noticed
> though, that idr_get_new_above always returns the first available id.
> This causes a serious problem for inotify, because user space will get a
> IGNORE event for a wd K that might refer to the last holder of the K.
Turns out that the problem was in our court and not the idr layer.
idr_get_new_above() seems to work fine.
One-line patch is attached. Please merge before 2.6.13.
Robert Love
We are saving the wrong thing in ->last_wd. We want the wd, not the return
value.
Signed-off-by: Robert Love <rml@novell.com>
fs/inotify.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -urN linux-2.6.13-rc6-git2/fs/inotify.c linux/fs/inotify.c
--- linux-2.6.13-rc6-git2/fs/inotify.c 2005-08-09 16:52:16.000000000 -0400
+++ linux/fs/inotify.c 2005-08-15 12:21:18.000000000 -0400
@@ -402,7 +402,7 @@
return ERR_PTR(ret);
}
- dev->last_wd = ret;
+ dev->last_wd = watch->wd;
watch->mask = mask;
atomic_set(&watch->count, 0);
INIT_LIST_HEAD(&watch->d_list);
next prev parent reply other threads:[~2005-08-15 16:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 14:16 idr_get_new_above not working? John McCutchan
2005-08-15 16:27 ` Robert Love [this message]
2005-08-15 16:35 ` [patch] inotify: " John McCutchan
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=1124123274.23297.122.camel@betsy \
--to=rml@novell.com \
--cc=akpm@osdl.org \
--cc=jim.houston@ccur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.