summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-07-19 09:18:15 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-23 00:00:58 +0400
commit8fc37ec54cd8e37193b0d42809b785ff19661c34 (patch)
tree12040128b054dc1b163433358b0fd2b8ec843762 /fs/ext4
parent32a7991b6a9c758e4e2b8166c5e1cc7563c3dcde (diff)
downloadlinux-stable-8fc37ec54cd8e37193b0d42809b785ff19661c34.tar.gz
linux-stable-8fc37ec54cd8e37193b0d42809b785ff19661c34.tar.bz2
linux-stable-8fc37ec54cd8e37193b0d42809b785ff19661c34.zip
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/ext4')
-rw-r--r--fs/ext4/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index eca3e48a62f8..d0d3f0e87f99 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2072,8 +2072,8 @@ static int ext4_add_nondir(handle_t *handle,
int err = ext4_add_entry(handle, dentry, inode);
if (!err) {
ext4_mark_inode_dirty(handle, inode);
- d_instantiate(dentry, inode);
unlock_new_inode(inode);
+ d_instantiate(dentry, inode);
return 0;
}
drop_nlink(inode);
@@ -2249,8 +2249,8 @@ out_clear_inode:
err = ext4_mark_inode_dirty(handle, dir);
if (err)
goto out_clear_inode;
- d_instantiate(dentry, inode);
unlock_new_inode(inode);
+ d_instantiate(dentry, inode);
out_stop:
brelse(dir_block);
ext4_journal_stop(handle);