aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-07-19 17:15:31 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-29 13:24:13 -0400
commit921a1650de9eed40dd64d681aba4a4d98856f289 (patch)
treec4740f5ee8de85ebbb1b519acf2b8e249bce0c56 /net
parent25b2692a8ace4c2684d3899a0bfe55f8c4248899 (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 'net')
-rw-r--r--net/unix/af_unix.c9
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:
887 mnt_drop_write(path.mnt); 887 mnt_drop_write(path.mnt);
888 if (err) 888 if (err)
889 goto out_mknod_dput; 889 goto out_mknod_dput;
890 mutex_unlock(&path.dentry->d_inode->i_mutex); 890 mntget(path.mnt);
891 dput(path.dentry); 891 dget(dentry);
892 done_path_create(&path, dentry);
892 path.dentry = dentry; 893 path.dentry = dentry;
893 894
894 addr->hash = UNIX_HASH_SIZE; 895 addr->hash = UNIX_HASH_SIZE;
@@ -923,9 +924,7 @@ out:
923 return err; 924 return err;
924 925
925out_mknod_dput: 926out_mknod_dput:
926 dput(dentry); 927 done_path_create(&path, dentry);
927 mutex_unlock(&path.dentry->d_inode->i_mutex);
928 path_put(&path);
929out_mknod_parent: 928out_mknod_parent:
930 if (err == -EEXIST) 929 if (err == -EEXIST)
931 err = -EADDRINUSE; 930 err = -EADDRINUSE;