From: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
To: Sage Weil <sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org>
Cc: Al Viro <viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
Sebastian Andrzej Siewior
<bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Tanya Brokhman <tlinder-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Huajun Li <huajun.li.lee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org,
ablay-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
Jassi Brar
<jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC] usb: don't dput() in usbfs_rmdir()
Date: Tue, 31 May 2011 20:54:29 +0400 [thread overview]
Message-ID: <4DE51D45.8070909@ru.mvista.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1105310909370.25709-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
Hello.
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?
> Patch is below. Thanks for testing!
> sage
> From 2dbf6d8f7426980d4c0d8798222b2ce9eed76651 Mon Sep 17 00:00:00 2001
> From: Sage Weil <sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org>
> Date: Tue, 31 May 2011 09:09:16 -0700
> Subject: [PATCH] usb: remove bad dput after dentry_unhash
> Commit 64252c75a removed the useless dget from dentry_unhash but didn't
Please also specify that commit's summary in parens -- for the human readers.
Commit ID is only immediately usable to gitweb.
> fix up this caller in the usb code. There used to be exactly one dput per
> dentry_unhash call; now there are none.
> Tested-by: Sebastian Andrzej Siewior <bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
> Signed-off-by: Sage Weil <sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org>
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-05-31 16:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <c53791ee86b26aac740ff8db61454972.squirrel@www.codeaurora.org>
[not found] ` <BANLkTinspCvVeP7k5faYio4YPRqGbnzzTg@mail.gmail.com>
[not found] ` <000001cc1eb1$6aa8e500$3ffaaf00$@org>
[not found] ` <BANLkTimaMihxe75vTXDS1HivCbj8-v-pBg@mail.gmail.com>
[not found] ` <BANLkTimaMihxe75vTXDS1HivCbj8-v-pBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-30 15:35 ` [RFC] usb: don't dput() in usbfs_rmdir() Sebastian Andrzej Siewior
[not found] ` <20110530153520.GA2386-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-05-30 15:44 ` Jassi Brar
2011-05-30 20:27 ` Sage Weil
2011-05-31 9:53 ` Sebastian Andrzej Siewior
2011-05-31 16:11 ` Sage Weil
[not found] ` <Pine.LNX.4.64.1105310909370.25709-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2011-05-31 16:54 ` Sergei Shtylyov [this message]
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=4DE51D45.8070909@ru.mvista.com \
--to=sshtylyov-igf4poytycdqt0dzr+alfa@public.gmane.org \
--cc=ablay-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
--cc=huajun.li.lee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org \
--cc=tlinder-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
/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.