aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-07-19 01:18:15 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-22 16:00:58 -0400
commit8fc37ec54cd8e37193b0d42809b785ff19661c34 (patch)
tree12040128b054dc1b163433358b0fd2b8ec843762 /fs/ext3/namei.c
parent32a7991b6a9c758e4e2b8166c5e1cc7563c3dcde (diff)
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>
Diffstat (limited to 'fs/ext3/namei.c')
-rw-r--r--fs/ext3/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
index 85286dbe2753..8f4fddac01a6 100644
--- a/fs/ext3/namei.c
+++ b/fs/ext3/namei.c
@@ -1671,8 +1671,8 @@ static int ext3_add_nondir(handle_t *handle,
1671 int err = ext3_add_entry(handle, dentry, inode); 1671 int err = ext3_add_entry(handle, dentry, inode);
1672 if (!err) { 1672 if (!err) {
1673 ext3_mark_inode_dirty(handle, inode); 1673 ext3_mark_inode_dirty(handle, inode);
1674 d_instantiate(dentry, inode);
1675 unlock_new_inode(inode); 1674 unlock_new_inode(inode);
1675 d_instantiate(dentry, inode);
1676 return 0; 1676 return 0;
1677 } 1677 }
1678 drop_nlink(inode); 1678 drop_nlink(inode);
@@ -1836,8 +1836,8 @@ out_clear_inode:
1836 if (err) 1836 if (err)
1837 goto out_clear_inode; 1837 goto out_clear_inode;
1838 1838
1839 d_instantiate(dentry, inode);
1840 unlock_new_inode(inode); 1839 unlock_new_inode(inode);
1840 d_instantiate(dentry, inode);
1841out_stop: 1841out_stop:
1842 brelse(dir_block); 1842 brelse(dir_block);
1843 ext3_journal_stop(handle); 1843 ext3_journal_stop(handle);