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:
Al Viro 2012-07-19 09:18:15 +04:00
commit 8fc37ec54c
7 changed files with 19 additions and 19 deletions

View file

@ -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: