[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1227915452.3393.16.camel@localhost.localdomain>
Date: Fri, 28 Nov 2008 18:37:32 -0500
From: Eric Paris <eparis@...hat.com>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: linux-kernel@...r.kernel.org, malware-list@...ts.printk.net,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
arjan@...radead.org, hch@...radead.org, a.p.zijlstra@...llo.nl
Subject: Re: [PATCH -v3 8/8] dnotify: reimplement dnotify using fsnotify
On Fri, 2008-11-28 at 05:14 +0000, Al Viro wrote:
> On Tue, Nov 25, 2008 at 12:21:33PM -0500, Eric Paris wrote:
>
> > + .mark_clear_inode = clear_mark_dir_notify,
>
> ... called under a spinlock
>
> > +static void clear_mark_dir_notify(struct fsnotify_mark_entry *entry, struct inode *inode, unsigned long mask __attribute__ ((unused)), unsigned int flags)
> > +{
> ...
> > + fsnotify_put_group(dnotify_group);
>
> ... which grabs a mutex.
You're right, I should drop and retake the spinlock. But in reality I
shouldn't ever get here and plan to replace all of this code with a
BUG() rather than the WARN() I have today since I know I can safely
recover.
> Incidentally, why the hell do you bother with refcounting on groups here?
> dnotify is not something that's going to be unloaded, for fsck sake...
Well, I do unregister dnotify if you stop watching any files. I also
plan to implement inotify as one inotify_init() per group. And fsnotify
groups exist only as long as there is a fsnotify socket bound....
-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists