aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs
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/reiserfs
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/reiserfs')
-rw-r--r--fs/reiserfs/namei.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index 3916be1a330b..8567fb847601 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -634,8 +634,8 @@ static int reiserfs_create(struct inode *dir, struct dentry *dentry, umode_t mod
634 reiserfs_update_inode_transaction(inode); 634 reiserfs_update_inode_transaction(inode);
635 reiserfs_update_inode_transaction(dir); 635 reiserfs_update_inode_transaction(dir);
636 636
637 d_instantiate(dentry, inode);
638 unlock_new_inode(inode); 637 unlock_new_inode(inode);
638 d_instantiate(dentry, inode);
639 retval = journal_end(&th, dir->i_sb, jbegin_count); 639 retval = journal_end(&th, dir->i_sb, jbegin_count);
640 640
641 out_failed: 641 out_failed:
@@ -712,8 +712,8 @@ static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode
712 goto out_failed; 712 goto out_failed;
713 } 713 }
714 714
715 d_instantiate(dentry, inode);
716 unlock_new_inode(inode); 715 unlock_new_inode(inode);
716 d_instantiate(dentry, inode);
717 retval = journal_end(&th, dir->i_sb, jbegin_count); 717 retval = journal_end(&th, dir->i_sb, jbegin_count);
718 718
719 out_failed: 719 out_failed:
@@ -800,8 +800,8 @@ static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
800 // the above add_entry did not update dir's stat data 800 // the above add_entry did not update dir's stat data
801 reiserfs_update_sd(&th, dir); 801 reiserfs_update_sd(&th, dir);
802 802
803 d_instantiate(dentry, inode);
804 unlock_new_inode(inode); 803 unlock_new_inode(inode);
804 d_instantiate(dentry, inode);
805 retval = journal_end(&th, dir->i_sb, jbegin_count); 805 retval = journal_end(&th, dir->i_sb, jbegin_count);
806out_failed: 806out_failed:
807 reiserfs_write_unlock_once(dir->i_sb, lock_depth); 807 reiserfs_write_unlock_once(dir->i_sb, lock_depth);
@@ -1096,8 +1096,8 @@ static int reiserfs_symlink(struct inode *parent_dir,
1096 goto out_failed; 1096 goto out_failed;
1097 } 1097 }
1098 1098
1099 d_instantiate(dentry, inode);
1100 unlock_new_inode(inode); 1099 unlock_new_inode(inode);
1100 d_instantiate(dentry, inode);
1101 retval = journal_end(&th, parent_dir->i_sb, jbegin_count); 1101 retval = journal_end(&th, parent_dir->i_sb, jbegin_count);
1102 out_failed: 1102 out_failed:
1103 reiserfs_write_unlock(parent_dir->i_sb); 1103 reiserfs_write_unlock(parent_dir->i_sb);