mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
don't expose I_NEW inodes via dentry->d_inode
d_instantiate(dentry, inode); unlock_new_inode(inode); is a bad idea; do it the other way round... Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
32a7991b6a
commit
8fc37ec54c
7 changed files with 19 additions and 19 deletions
|
|
@ -176,8 +176,8 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode,
|
|||
unlock_new_inode(ip);
|
||||
iput(ip);
|
||||
} else {
|
||||
d_instantiate(dentry, ip);
|
||||
unlock_new_inode(ip);
|
||||
d_instantiate(dentry, ip);
|
||||
}
|
||||
|
||||
out2:
|
||||
|
|
@ -309,8 +309,8 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, umode_t mode)
|
|||
unlock_new_inode(ip);
|
||||
iput(ip);
|
||||
} else {
|
||||
d_instantiate(dentry, ip);
|
||||
unlock_new_inode(ip);
|
||||
d_instantiate(dentry, ip);
|
||||
}
|
||||
|
||||
out2:
|
||||
|
|
@ -1043,8 +1043,8 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
|
|||
unlock_new_inode(ip);
|
||||
iput(ip);
|
||||
} else {
|
||||
d_instantiate(dentry, ip);
|
||||
unlock_new_inode(ip);
|
||||
d_instantiate(dentry, ip);
|
||||
}
|
||||
|
||||
out2:
|
||||
|
|
@ -1424,8 +1424,8 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry,
|
|||
unlock_new_inode(ip);
|
||||
iput(ip);
|
||||
} else {
|
||||
d_instantiate(dentry, ip);
|
||||
unlock_new_inode(ip);
|
||||
d_instantiate(dentry, ip);
|
||||
}
|
||||
|
||||
out1:
|
||||
|
|
|
|||
Loading…
Reference in a new issue