aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/devtmpfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/devtmpfs.c')
-rw-r--r--drivers/base/devtmpfs.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
index d91a3a0b2325..deb4a456cf83 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -156,9 +156,7 @@ static int dev_mkdir(const char *name, umode_t mode)
156 if (!err) 156 if (!err)
157 /* mark as kernel-created inode */ 157 /* mark as kernel-created inode */
158 dentry->d_inode->i_private = &thread; 158 dentry->d_inode->i_private = &thread;
159 dput(dentry); 159 done_path_create(&path, dentry);
160 mutex_unlock(&path.dentry->d_inode->i_mutex);
161 path_put(&path);
162 return err; 160 return err;
163} 161}
164 162
@@ -218,10 +216,7 @@ static int handle_create(const char *nodename, umode_t mode, struct device *dev)
218 /* mark as kernel-created inode */ 216 /* mark as kernel-created inode */
219 dentry->d_inode->i_private = &thread; 217 dentry->d_inode->i_private = &thread;
220 } 218 }
221 dput(dentry); 219 done_path_create(&path, dentry);
222
223 mutex_unlock(&path.dentry->d_inode->i_mutex);
224 path_put(&path);
225 return err; 220 return err;
226} 221}
227 222