From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anand Avati Subject: Re: [PATCH] fuse: mark all aliases of an inode stale in unlink Date: Fri, 20 Jan 2012 20:54:08 +0530 Message-ID: <4F198718.8050902@redhat.com> References: <20120119215649.GA19933@shell.devel.redhat.com> <87vco6saic.fsf@tucsk.pomaz.szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, fuse-devel@lists.sourceforge.net, josef@redhat.com, chenk@redhat.com, Boris Protopopov To: Miklos Szeredi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1026 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753179Ab2ATPZQ (ORCPT ); Fri, 20 Jan 2012 10:25:16 -0500 In-Reply-To: <87vco6saic.fsf@tucsk.pomaz.szeredi.hu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 01/20/2012 08:10 PM, Miklos Szeredi wrote: > Untested patch below. Does that work for you? > > Thanks, > Miklos > > > diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c > index 2066328..517a7f5 100644 > --- a/fs/fuse/dir.c > +++ b/fs/fuse/dir.c > @@ -645,12 +645,7 @@ static int fuse_unlink(struct inode *dir, struct dentry *entry) > if (!err) { > struct inode *inode = entry->d_inode; > > - /* > - * Set nlink to zero so the inode can be cleared, if the inode > - * does have more links this will be discovered at the next > - * lookup/getattr. > - */ > - clear_nlink(inode); > + drop_nlink(inode); > fuse_invalidate_attr(inode); > fuse_invalidate_attr(dir); > fuse_invalidate_entry_cache(entry); That will work for me! Thanks, Avati