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 <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -1671,8 +1671,8 @@ static int ext3_add_nondir(handle_t *handle,
|
||||
int err = ext3_add_entry(handle, dentry, inode);
|
||||
if (!err) {
|
||||
ext3_mark_inode_dirty(handle, inode);
|
||||
d_instantiate(dentry, inode);
|
||||
unlock_new_inode(inode);
|
||||
d_instantiate(dentry, inode);
|
||||
return 0;
|
||||
}
|
||||
drop_nlink(inode);
|
||||
@@ -1836,8 +1836,8 @@ out_clear_inode:
|
||||
if (err)
|
||||
goto out_clear_inode;
|
||||
|
||||
d_instantiate(dentry, inode);
|
||||
unlock_new_inode(inode);
|
||||
d_instantiate(dentry, inode);
|
||||
out_stop:
|
||||
brelse(dir_block);
|
||||
ext3_journal_stop(handle);
|
||||
|
Reference in New Issue
Block a user