mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-27 00:43:16 +00:00
btrfs: remove super block argument from btrfs_iget_locked()
It's pointless to pass a super block argument to btrfs_iget_locked() because we always pass a root and from it we can get the super block through: root->fs_info->sb So remove the super block argument. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
d383eb69eb
commit
b751915765
@ -5573,8 +5573,7 @@ static int btrfs_find_actor(struct inode *inode, void *opaque)
|
|||||||
args->root == BTRFS_I(inode)->root;
|
args->root == BTRFS_I(inode)->root;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct inode *btrfs_iget_locked(struct super_block *s, u64 ino,
|
static struct inode *btrfs_iget_locked(u64 ino, struct btrfs_root *root)
|
||||||
struct btrfs_root *root)
|
|
||||||
{
|
{
|
||||||
struct inode *inode;
|
struct inode *inode;
|
||||||
struct btrfs_iget_args args;
|
struct btrfs_iget_args args;
|
||||||
@ -5583,7 +5582,7 @@ static struct inode *btrfs_iget_locked(struct super_block *s, u64 ino,
|
|||||||
args.ino = ino;
|
args.ino = ino;
|
||||||
args.root = root;
|
args.root = root;
|
||||||
|
|
||||||
inode = iget5_locked(s, hashval, btrfs_find_actor,
|
inode = iget5_locked(root->fs_info->sb, hashval, btrfs_find_actor,
|
||||||
btrfs_init_locked_inode,
|
btrfs_init_locked_inode,
|
||||||
(void *)&args);
|
(void *)&args);
|
||||||
return inode;
|
return inode;
|
||||||
@ -5601,7 +5600,7 @@ struct inode *btrfs_iget_path(u64 ino, struct btrfs_root *root,
|
|||||||
struct inode *inode;
|
struct inode *inode;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
inode = btrfs_iget_locked(root->fs_info->sb, ino, root);
|
inode = btrfs_iget_locked(ino, root);
|
||||||
if (!inode)
|
if (!inode)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user