diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e064c49c9a9a..9e97cbb4f006 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -6575,8 +6575,7 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry, | |||
6575 | goto out_unlock_inode; | 6575 | goto out_unlock_inode; |
6576 | } else { | 6576 | } else { |
6577 | btrfs_update_inode(trans, root, inode); | 6577 | btrfs_update_inode(trans, root, inode); |
6578 | unlock_new_inode(inode); | 6578 | d_instantiate_new(dentry, inode); |
6579 | d_instantiate(dentry, inode); | ||
6580 | } | 6579 | } |
6581 | 6580 | ||
6582 | out_unlock: | 6581 | out_unlock: |
@@ -6652,8 +6651,7 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry, | |||
6652 | goto out_unlock_inode; | 6651 | goto out_unlock_inode; |
6653 | 6652 | ||
6654 | BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; | 6653 | BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; |
6655 | unlock_new_inode(inode); | 6654 | d_instantiate_new(dentry, inode); |
6656 | d_instantiate(dentry, inode); | ||
6657 | 6655 | ||
6658 | out_unlock: | 6656 | out_unlock: |
6659 | btrfs_end_transaction(trans); | 6657 | btrfs_end_transaction(trans); |
@@ -6798,12 +6796,7 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
6798 | if (err) | 6796 | if (err) |
6799 | goto out_fail_inode; | 6797 | goto out_fail_inode; |
6800 | 6798 | ||
6801 | d_instantiate(dentry, inode); | 6799 | d_instantiate_new(dentry, inode); |
6802 | /* | ||
6803 | * mkdir is special. We're unlocking after we call d_instantiate | ||
6804 | * to avoid a race with nfsd calling d_instantiate. | ||
6805 | */ | ||
6806 | unlock_new_inode(inode); | ||
6807 | drop_on_err = 0; | 6800 | drop_on_err = 0; |
6808 | 6801 | ||
6809 | out_fail: | 6802 | out_fail: |
@@ -10246,8 +10239,7 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry, | |||
10246 | goto out_unlock_inode; | 10239 | goto out_unlock_inode; |
10247 | } | 10240 | } |
10248 | 10241 | ||
10249 | unlock_new_inode(inode); | 10242 | d_instantiate_new(dentry, inode); |
10250 | d_instantiate(dentry, inode); | ||
10251 | 10243 | ||
10252 | out_unlock: | 10244 | out_unlock: |
10253 | btrfs_end_transaction(trans); | 10245 | btrfs_end_transaction(trans); |