diff options
author | Christoph Hellwig <hch@lst.de> | 2021-03-29 21:11:37 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-04-08 00:37:02 +0300 |
commit | af9dcddef662e1437a63c2decb6e1e2efb7d81ea (patch) | |
tree | cfcf657f88f6bdbe4926b8801aeca8cbd058d24a /fs/xfs/xfs_icache.c | |
parent | e773f88029b179ea03855c22d5052e2e90362a81 (diff) | |
download | linux-af9dcddef662e1437a63c2decb6e1e2efb7d81ea.tar.xz |
xfs: split xfs_imap_to_bp
Split looking up the dinode from xfs_imap_to_bp, which can be
significantly simplified as a result.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_icache.c')
-rw-r--r-- | fs/xfs/xfs_icache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index e6a62f765422..248c42bf212d 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -505,14 +505,14 @@ xfs_iget_cache_miss( (flags & XFS_IGET_CREATE) && !(mp->m_flags & XFS_MOUNT_IKEEP)) { VFS_I(ip)->i_generation = prandom_u32(); } else { - struct xfs_dinode *dip; struct xfs_buf *bp; - error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &bp, 0); + error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &bp); if (error) goto out_destroy; - error = xfs_inode_from_disk(ip, dip); + error = xfs_inode_from_disk(ip, + xfs_buf_offset(bp, ip->i_imap.im_boffset)); if (!error) xfs_buf_set_ref(bp, XFS_INO_REF); xfs_trans_brelse(tp, bp); |