diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 998ea111e537e8..1194b1f0f8396c 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c @@ -1780,11 +1780,11 @@ static int ext3_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) inode->i_op = &ext3_file_inode_operations; inode->i_fop = &ext3_file_operations; ext3_set_aops(inode); + d_tmpfile(dentry, inode); err = ext3_orphan_add(handle, inode); if (err) goto err_drop_inode; mark_inode_dirty(inode); - d_tmpfile(dentry, inode); unlock_new_inode(inode); } ext3_journal_stop(handle);