linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] devtmpfs: Calling delete_path() only when necessary
@ 2013-11-16  8:15 Axel Lin
  2013-12-04  2:59 ` Rob Landley
  0 siblings, 1 reply; 11+ messages in thread
From: Axel Lin @ 2013-11-16  8:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Al Viro; +Cc: Kay Sievers, linux-kernel

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




^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-12-10  7:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-16  8:15 [PATCH] devtmpfs: Calling delete_path() only when necessary Axel Lin
2013-12-04  2:59 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).