diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-19 09:18:15 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-23 00:00:58 +0400 |
commit | 8fc37ec54cd8e37193b0d42809b785ff19661c34 (patch) | |
tree | 12040128b054dc1b163433358b0fd2b8ec843762 /fs/ext3 | |
parent | 32a7991b6a9c758e4e2b8166c5e1cc7563c3dcde (diff) | |
download | linux-8fc37ec54cd8e37193b0d42809b785ff19661c34.tar.gz linux-8fc37ec54cd8e37193b0d42809b785ff19661c34.tar.bz2 linux-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/ext3')
-rw-r--r-- | fs/ext3/namei.c | 4 |
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, 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); |