diff options
author | Filipe Manana <fdmanana@suse.com> | 2025-03-07 12:16:10 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-03-18 20:35:50 +0100 |
commit | b204e5c7d4dce859bc2feed7685baf656e234f6d (patch) | |
tree | 0117af49e724e082bbc2a032e39b5e352b289ddf /fs/btrfs/tree-log.c | |
parent | 14d063ec852f7020f4c2664ce4eb55f3466b3999 (diff) |
btrfs: make btrfs_iget() return a btrfs inode instead
It's an internal function and most of the time the callers are doing a lot
of BTRFS_I() calls on the returned VFS inode to get the btrfs inode, so
change the return type to struct btrfs_inode instead.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 349c9482e9b9..2d23223f476b 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -141,7 +141,7 @@ static void wait_log_commit(struct btrfs_root *root, int transid); static struct btrfs_inode *btrfs_iget_logging(u64 objectid, struct btrfs_root *root) { unsigned int nofs_flag; - struct inode *inode; + struct btrfs_inode *inode; /* * We're holding a transaction handle whether we are logging or @@ -154,10 +154,7 @@ static struct btrfs_inode *btrfs_iget_logging(u64 objectid, struct btrfs_root *r inode = btrfs_iget(objectid, root); memalloc_nofs_restore(nofs_flag); - if (IS_ERR(inode)) - return ERR_CAST(inode); - - return BTRFS_I(inode); + return inode; } /* |