Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro: "Assorted fixes all over the place" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: aio: fix io_destroy(2) vs. lookup_ioctx() race ext2: fix a block leak nfsd: vfs_mkdir() might succeed leaving dentry negative unhashed cachefiles: vfs_mkdir() might succeed leaving dentry negative unhashed unfuck sysfs_mount() kernfs: deal with kernfs_fill_super() failures cramfs: Fix IS_ENABLED typo befs_lookup(): use d_splice_alias() affs_lookup: switch to d_splice_alias() affs_lookup(): close a race with affs_remove_link() fix breakage caused by d_find_alias() semantics change fs: don't scan the inode cache before SB_BORN is set do d_instantiate/unlock_new_inode combinations safely iov_iter: fix memory leak in pipe_get_pages_alloc() iov_iter: fix return type of __pipe_get_pages()
This commit is contained in:
@@ -6586,8 +6586,7 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry,
|
||||
goto out_unlock_inode;
|
||||
} else {
|
||||
btrfs_update_inode(trans, root, inode);
|
||||
unlock_new_inode(inode);
|
||||
d_instantiate(dentry, inode);
|
||||
d_instantiate_new(dentry, inode);
|
||||
}
|
||||
|
||||
out_unlock:
|
||||
@@ -6663,8 +6662,7 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry,
|
||||
goto out_unlock_inode;
|
||||
|
||||
BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops;
|
||||
unlock_new_inode(inode);
|
||||
d_instantiate(dentry, inode);
|
||||
d_instantiate_new(dentry, inode);
|
||||
|
||||
out_unlock:
|
||||
btrfs_end_transaction(trans);
|
||||
@@ -6809,12 +6807,7 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
|
||||
if (err)
|
||||
goto out_fail_inode;
|
||||
|
||||
d_instantiate(dentry, inode);
|
||||
/*
|
||||
* mkdir is special. We're unlocking after we call d_instantiate
|
||||
* to avoid a race with nfsd calling d_instantiate.
|
||||
*/
|
||||
unlock_new_inode(inode);
|
||||
d_instantiate_new(dentry, inode);
|
||||
drop_on_err = 0;
|
||||
|
||||
out_fail:
|
||||
@@ -10257,8 +10250,7 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry,
|
||||
goto out_unlock_inode;
|
||||
}
|
||||
|
||||
unlock_new_inode(inode);
|
||||
d_instantiate(dentry, inode);
|
||||
d_instantiate_new(dentry, inode);
|
||||
|
||||
out_unlock:
|
||||
btrfs_end_transaction(trans);
|
||||
|
Reference in New Issue
Block a user