From: Axel Lin Date: Sat, 16 Nov 2013 08:15:23 +0000 (+0800) Subject: devtmpfs: Calling delete_path() only when necessary X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fbde7c6119f99a0e316ad1a8fe0788bd76d277b1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git devtmpfs: Calling delete_path() only when necessary 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index 0f3820121e02..25798db14553 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);