diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-19 17:15:31 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-29 13:24:13 -0400 |
commit | 921a1650de9eed40dd64d681aba4a4d98856f289 (patch) | |
tree | c4740f5ee8de85ebbb1b519acf2b8e249bce0c56 /drivers/base | |
parent | 25b2692a8ace4c2684d3899a0bfe55f8c4248899 (diff) |
new helper: done_path_create()
releases what needs to be released after {kern,user}_path_create()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/devtmpfs.c | 9 |
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 | ||