diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-19 23:15:31 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-29 19:24:13 +0200 |
commit | 921a1650de9eed40dd64d681aba4a4d98856f289 (patch) | |
tree | c4740f5ee8de85ebbb1b519acf2b8e249bce0c56 /net/unix | |
parent | pull unlock+dput() out into do_spu_create() (diff) | |
download | linux-921a1650de9eed40dd64d681aba4a4d98856f289.tar.xz 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 'net/unix')
-rw-r--r-- | net/unix/af_unix.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 641f2e47f165..e8239540683a 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -887,8 +887,9 @@ out_mknod_drop_write: mnt_drop_write(path.mnt); if (err) goto out_mknod_dput; - mutex_unlock(&path.dentry->d_inode->i_mutex); - dput(path.dentry); + mntget(path.mnt); + dget(dentry); + done_path_create(&path, dentry); path.dentry = dentry; addr->hash = UNIX_HASH_SIZE; @@ -923,9 +924,7 @@ out: return err; out_mknod_dput: - dput(dentry); - mutex_unlock(&path.dentry->d_inode->i_mutex); - path_put(&path); + done_path_create(&path, dentry); out_mknod_parent: if (err == -EEXIST) err = -EADDRINUSE; |