From: Javier Fernandez-Ivern <ivern@acm.org>
To: rudi@lambda-computing.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: File change notification
Date: Wed, 31 Dec 2003 12:49:07 -0800 [thread overview]
Message-ID: <3FF33643.5080808@acm.org> (raw)
In-Reply-To: <3FF2FC85.5070906@lambda-computing.de>
Rüdiger Klaehn wrote:
Rudiger, I've been reading your code to try and understand it, and I
found one think I'm not so sure about:
> +++ develop/fs/dnotify.c 2003-12-31 16:59:36.000000000 +0100
> @@ -153,8 +153,9 @@
> void dnotify_parent(struct dentry *dentry, unsigned long event)
> {
> struct dentry *parent;
> -
> spin_lock(&dentry->d_lock);
> + /* call inotify for this dentry */
> + inotify_dentrychange(dentry,event);
...
> +/*
> + * This function should be called when something changes about a dentry, such
> + * as attributes, creating, deleting, renaming etc.
> + */
> +void inotify_dentrychange(struct dentry *dentry,unsigned long event)
> +{
> + in_info info;
> + struct dentry *parent;
> + memset(&info,0,sizeof(in_info));
> + info.event=event;
> + spin_lock(&dentry->d_lock);
inotify_dentrychange() is called from dnotify_parent() with the
dentry->d_lock spinlock held. However, it also tries to attain the
spinlock. Wouldn't this deadlock? I thought spinlocks were not recursive.
Please let me know if I'm not understanding this...I'm a locking newbie.
--
Javier Fernandez-Ivern
next prev parent reply other threads:[~2003-12-31 20:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-31 16:42 File change notification Rüdiger Klaehn
2003-12-31 18:20 ` Javier Fernandez-Ivern
2003-12-31 18:48 ` Rüdiger Klaehn
2004-01-01 1:28 ` Michael Clark
2004-01-01 1:58 ` Dave Jones
2004-01-01 2:18 ` Michael Clark
2004-01-01 2:30 ` Javier Fernandez-Ivern
2004-01-01 13:11 ` Rüdiger Klaehn
2003-12-31 20:49 ` Javier Fernandez-Ivern [this message]
2004-01-01 9:02 ` Juergen Hasch
2004-01-01 10:47 ` jw schultz
2004-01-01 12:44 ` Rüdiger Klaehn
2004-01-03 6:32 ` Jan Harkes
-- strict thread matches above, loose matches on Subject: below --
2004-02-07 8:29 John Ogness
2004-02-07 14:01 ` Christoph Hellwig
[not found] <18PG9-4og-27@gated-at.bofh.it>
[not found] ` <18TgF-QJ-7@gated-at.bofh.it>
[not found] ` <18TJE-1qL-3@gated-at.bofh.it>
2003-12-31 19:30 ` René Scharfe
2002-11-01 21:31 file " Colin Burnett
2002-11-01 22:19 ` Chris Wright
2002-11-02 15:43 ` Jamie Lokier
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=3FF33643.5080808@acm.org \
--to=ivern@acm.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rudi@lambda-computing.de \
/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.