From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Andrzej Siewior Subject: Re: [RFC] usb: don't dput() in usbfs_rmdir() Date: Tue, 31 May 2011 11:53:26 +0200 Message-ID: <4DE4BA96.1090905@linutronix.de> References: <000001cc1eb1$6aa8e500$3ffaaf00$@org> <20110530153520.GA2386@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Tanya Brokhman , Huajun Li , linux-usb@vger.kernel.org, greg@kroah.com, ablay@codeaurora.org, Jassi Brar , Al Viro , linux-fsdevel@vger.kernel.org To: Sage Weil Return-path: Received: from www.linutronix.de ([62.245.132.108]:36257 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750762Ab1EaJxf (ORCPT ); Tue, 31 May 2011 05:53:35 -0400 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Sage Weil wrote: >> Could one of VFS ppl look at this an NACK/ACK it? > > I think it's the other dput that you want to remove. 64252c75 is a > misleading because the first hunk has to remove dput() from every exit > path for the function. dentry_unhash is unconditionally doing dget, > though. I think we want > > diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c > index 1b125c2..2278dad 100644 > --- a/drivers/usb/core/inode.c > +++ b/drivers/usb/core/inode.c > @@ -389,7 +389,6 @@ static int usbfs_rmdir(struct inode *dir, struct dentry *dentry) > mutex_unlock(&inode->i_mutex); > if (!error) > d_delete(dentry); > - dput(dentry); > return error; > } Yep, this is the correct one. I added a file and removed it after the hcd was gone and it only survived your way :) Are you going to post a complete patch or do you want me to do it? > Sorry I missed this one; I forgot there were filesystems outside of fs/. Yes, they all over the place including arch/ :) > > sage Sebastian