aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_itable.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_itable.c')
-rw-r--r--fs/xfs/xfs_itable.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c
index 42a214b8df9e..35118032a5d6 100644
--- a/fs/xfs/xfs_itable.c
+++ b/fs/xfs/xfs_itable.c
@@ -359,7 +359,6 @@ xfs_bulkstat(
359 int ubused; /* bytes used by formatter */ 359 int ubused; /* bytes used by formatter */
360 xfs_buf_t *bp; /* ptr to on-disk inode cluster buf */ 360 xfs_buf_t *bp; /* ptr to on-disk inode cluster buf */
361 xfs_dinode_t *dip; /* ptr into bp for specific inode */ 361 xfs_dinode_t *dip; /* ptr into bp for specific inode */
362 xfs_inode_t *ip; /* ptr to in-core inode struct */
363 362
364 /* 363 /*
365 * Get the last inode value, see if there's nothing to do. 364 * Get the last inode value, see if there's nothing to do.
@@ -585,6 +584,8 @@ xfs_bulkstat(
585 584
586 if (flags & (BULKSTAT_FG_QUICK | 585 if (flags & (BULKSTAT_FG_QUICK |
587 BULKSTAT_FG_INLINE)) { 586 BULKSTAT_FG_INLINE)) {
587 int offset;
588
588 ino = XFS_AGINO_TO_INO(mp, agno, 589 ino = XFS_AGINO_TO_INO(mp, agno,
589 agino); 590 agino);
590 bno = XFS_AGB_TO_DADDR(mp, agno, 591 bno = XFS_AGB_TO_DADDR(mp, agno,
@@ -595,19 +596,13 @@ xfs_bulkstat(
595 */ 596 */
596 if (bp) 597 if (bp)
597 xfs_buf_relse(bp); 598 xfs_buf_relse(bp);
598 ip = xfs_inode_alloc(mp, ino); 599
599 if (!ip) { 600 error = xfs_inotobp(mp, NULL, ino, &dip,
600 bp = NULL; 601 &bp, &offset,
601 rval = ENOMEM; 602 XFS_IMAP_BULKSTAT);
602 break; 603
603 }
604 error = xfs_itobp(mp, NULL, ip,
605 &dip, &bp, bno,
606 XFS_IMAP_BULKSTAT,
607 XFS_BUF_LOCK);
608 if (!error) 604 if (!error)
609 clustidx = ip->i_boffset / mp->m_sb.sb_inodesize; 605 clustidx = offset / mp->m_sb.sb_inodesize;
610 xfs_idestroy(ip);
611 if (XFS_TEST_ERROR(error != 0, 606 if (XFS_TEST_ERROR(error != 0,
612 mp, XFS_ERRTAG_BULKSTAT_READ_CHUNK, 607 mp, XFS_ERRTAG_BULKSTAT_READ_CHUNK,
613 XFS_RANDOM_BULKSTAT_READ_CHUNK)) { 608 XFS_RANDOM_BULKSTAT_READ_CHUNK)) {