diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-20 01:15:31 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-29 21:24:13 +0400 |
commit | 921a1650de9eed40dd64d681aba4a4d98856f289 (patch) | |
tree | c4740f5ee8de85ebbb1b519acf2b8e249bce0c56 /drivers/base | |
parent | 25b2692a8ace4c2684d3899a0bfe55f8c4248899 (diff) | |
download | blackbird-op-linux-921a1650de9eed40dd64d681aba4a4d98856f289.tar.gz blackbird-op-linux-921a1650de9eed40dd64d681aba4a4d98856f289.zip |
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) if (!err) /* mark as kernel-created inode */ dentry->d_inode->i_private = &thread; - dput(dentry); - mutex_unlock(&path.dentry->d_inode->i_mutex); - path_put(&path); + done_path_create(&path, dentry); return err; } @@ -218,10 +216,7 @@ static int handle_create(const char *nodename, umode_t mode, struct device *dev) /* mark as kernel-created inode */ dentry->d_inode->i_private = &thread; } - dput(dentry); - - mutex_unlock(&path.dentry->d_inode->i_mutex); - path_put(&path); + done_path_create(&path, dentry); return err; } |