mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
25b2692a8a
commit
921a1650de
6 changed files with 21 additions and 30 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue