From: Axel Lin <axel.lin@ingics.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Al Viro <viro@zeniv.linux.org.uk>
Cc: Kay Sievers <kay.sievers@vrfy.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] devtmpfs: Calling delete_path() only when necessary
Date: Sat, 16 Nov 2013 16:15:23 +0800 [thread overview]
Message-ID: <1384589723.7840.1.camel@phoenix> (raw)
The deleted variable is always 1 in current code.
Initialize deleted variable to be 0, so delete_path() will be called only when
necessary.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/base/devtmpfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
index 0f38201..25798db 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -299,7 +299,7 @@ static int handle_remove(const char *nodename, struct device *dev)
{
struct path parent;
struct dentry *dentry;
- int deleted = 1;
+ int deleted = 0;
int err;
dentry = kern_path_locked(nodename, &parent);
--
1.8.1.2
next reply other threads:[~2013-11-16 8:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-16 8:15 Axel Lin [this message]
2013-12-04 2:59 ` [PATCH] devtmpfs: Calling delete_path() only when necessary Rob Landley
2013-12-04 6:44 ` Axel Lin
2013-12-04 7:10 ` Greg Kroah-Hartman
2013-12-09 6:46 ` Greg Kroah-Hartman
2013-12-09 8:54 ` Axel Lin
2013-12-09 9:05 ` Greg Kroah-Hartman
2013-12-09 9:06 ` Axel Lin
2013-12-10 6:08 ` Axel Lin
2013-12-10 7:26 ` Fengguang Wu
2013-12-10 7:53 ` Greg Kroah-Hartman
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=1384589723.7840.1.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=gregkh@linuxfoundation.org \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--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 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.