public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, malware-list@lists.printk.net,
	akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
	arjan@infradead.org, hch@infradead.org, a.p.zijlstra@chello.nl
Subject: Re: [PATCH -v3 8/8] dnotify: reimplement dnotify using fsnotify
Date: Fri, 28 Nov 2008 18:44:44 -0500	[thread overview]
Message-ID: <1227915884.3393.23.camel@localhost.localdomain> (raw)
In-Reply-To: <20081128062505.GK28946@ZenIV.linux.org.uk>

On Fri, 2008-11-28 at 06:25 +0000, Al Viro wrote:
> On Tue, Nov 25, 2008 at 12:21:33PM -0500, Eric Paris wrote:
> > -	inode->i_dnotify_mask |= arg & ~DN_MULTISHOT;
> > -	dn->dn_next = inode->i_dnotify;
> > -	inode->i_dnotify = dn;
> > -	spin_unlock(&inode->i_lock);
> > -
> > -	if (filp->f_op && filp->f_op->dir_notify)
> > -		return filp->f_op->dir_notify(filp, arg);
> > +	dn->dn_next = entry->private;
> > +	entry->private = dn;
> > +	dnotify_recalc_inode_mask(entry);
> > +	spin_unlock(&inode->i_fsnotify_lock);
> > +	fsnotify_mark_put(entry);
> > +	fsnotify_put_group(dnotify_group);
> 
> Now, that is interesting - you've just taken out the fscked-in-head
> ->dir_notify().  The action is quite laudable, but it deserves being
> announced properly:
> 
> * Remove the hopelessly misguided ->dir_notify().  The only instance (cifs)
> has been broken by design from the very beginning; the objects it creates
> are never destroyed, keep references to struct file they can outlive, nothing
> that could possibly evict them exists on close(2) path *and* no locking
> whatsoever is done to prevent races with close(), should the previous, er,
> deficiencies someday be dealt with.
> 
> While we are at it, removing the only call of that method is obviously
> only a half of the job...

crap, I actually meant to move that out to the actual do_fcntl() call to
get it out of my way.  I did see that it is useless since we don't
handle responses in any way and obviously this has nothing to do with
dnotify.....

I'll poke the cifs people to see if they are ok with dropping it
altogether properly....


  reply	other threads:[~2008-11-28 23:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25 17:20 [PATCH -v3 0/8] file notification: fsnotify a unified file notification backend Eric Paris
2008-11-25 17:20 ` [PATCH -v3 1/8] filesystem notification: create fs/notify to contain all fs notification Eric Paris
2008-11-28  5:24   ` Al Viro
2008-11-25 17:21 ` [PATCH -v3 2/8] fsnotify: pass a file instead of an inode to open, read, and write Eric Paris
2008-11-25 17:21 ` [PATCH -v3 3/8] fsnotify: sys_execve and sys_uselib do not call into fsnotify Eric Paris
2008-11-28 10:16   ` Christoph Hellwig
2008-11-25 17:21 ` [PATCH -v3 4/8] fsnotify: use the new open-exec hook for inotify and dnotify Eric Paris
2008-11-25 17:21 ` [PATCH -v3 5/8] fsnotify: unified filesystem notification backend Eric Paris
2008-11-27 16:14   ` Peter Zijlstra
2008-11-27 16:17   ` Peter Zijlstra
2008-11-27 16:20   ` Peter Zijlstra
2008-11-28 23:22     ` Eric Paris
2008-11-28 23:39       ` Peter Zijlstra
2008-11-27 16:21   ` Peter Zijlstra
2008-11-28  4:54   ` Al Viro
2008-11-28 23:32     ` Eric Paris
2008-11-25 17:21 ` [PATCH -v3 6/8] fsnotify: add group priorities Eric Paris
2008-11-27 16:25   ` Peter Zijlstra
2008-12-01 15:20     ` Eric Paris
2008-12-01 15:37       ` Peter Zijlstra
2008-11-25 17:21 ` [PATCH -v3 7/8] fsnotify: add in inode fsnotify markings Eric Paris
2008-11-27 16:29   ` Peter Zijlstra
2008-11-28  5:42   ` Al Viro
2008-11-28 23:43     ` Eric Paris
2008-11-25 17:21 ` [PATCH -v3 8/8] dnotify: reimplement dnotify using fsnotify Eric Paris
2008-11-28  5:14   ` Al Viro
2008-11-28 23:37     ` Eric Paris
2008-11-28  6:25   ` Al Viro
2008-11-28 23:44     ` Eric Paris [this message]
2008-11-26  0:14 ` [PATCH -v3 0/8] file notification: fsnotify a unified file notification backend Andrew Morton
2008-11-26  2:00   ` Eric Paris

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=1227915884.3393.23.camel@localhost.localdomain \
    --to=eparis@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjan@infradead.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=malware-list@lists.printk.net \
    --cc=viro@ZenIV.linux.org.uk \
    /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