diff options
Diffstat (limited to 'fs/xfs/xfs_itable.c')
-rw-r--r-- | fs/xfs/xfs_itable.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index 35118032a5d6..b3578cdc33dd 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c | |||
@@ -125,13 +125,9 @@ STATIC void | |||
125 | xfs_bulkstat_one_dinode( | 125 | xfs_bulkstat_one_dinode( |
126 | xfs_mount_t *mp, /* mount point for filesystem */ | 126 | xfs_mount_t *mp, /* mount point for filesystem */ |
127 | xfs_ino_t ino, /* inode number to get data for */ | 127 | xfs_ino_t ino, /* inode number to get data for */ |
128 | xfs_dinode_t *dip, /* dinode inode pointer */ | 128 | xfs_dinode_t *dic, /* dinode inode pointer */ |
129 | xfs_bstat_t *buf) /* return buffer */ | 129 | xfs_bstat_t *buf) /* return buffer */ |
130 | { | 130 | { |
131 | xfs_dinode_core_t *dic; /* dinode core info pointer */ | ||
132 | |||
133 | dic = &dip->di_core; | ||
134 | |||
135 | /* | 131 | /* |
136 | * The inode format changed when we moved the link count and | 132 | * The inode format changed when we moved the link count and |
137 | * made it 32 bits long. If this is an old format inode, | 133 | * made it 32 bits long. If this is an old format inode, |
@@ -162,7 +158,7 @@ xfs_bulkstat_one_dinode( | |||
162 | buf->bs_mtime.tv_nsec = be32_to_cpu(dic->di_mtime.t_nsec); | 158 | buf->bs_mtime.tv_nsec = be32_to_cpu(dic->di_mtime.t_nsec); |
163 | buf->bs_ctime.tv_sec = be32_to_cpu(dic->di_ctime.t_sec); | 159 | buf->bs_ctime.tv_sec = be32_to_cpu(dic->di_ctime.t_sec); |
164 | buf->bs_ctime.tv_nsec = be32_to_cpu(dic->di_ctime.t_nsec); | 160 | buf->bs_ctime.tv_nsec = be32_to_cpu(dic->di_ctime.t_nsec); |
165 | buf->bs_xflags = xfs_dic2xflags(dip); | 161 | buf->bs_xflags = xfs_dic2xflags(dic); |
166 | buf->bs_extsize = be32_to_cpu(dic->di_extsize) << mp->m_sb.sb_blocklog; | 162 | buf->bs_extsize = be32_to_cpu(dic->di_extsize) << mp->m_sb.sb_blocklog; |
167 | buf->bs_extents = be32_to_cpu(dic->di_nextents); | 163 | buf->bs_extents = be32_to_cpu(dic->di_nextents); |
168 | buf->bs_gen = be32_to_cpu(dic->di_gen); | 164 | buf->bs_gen = be32_to_cpu(dic->di_gen); |
@@ -173,7 +169,7 @@ xfs_bulkstat_one_dinode( | |||
173 | 169 | ||
174 | switch (dic->di_format) { | 170 | switch (dic->di_format) { |
175 | case XFS_DINODE_FMT_DEV: | 171 | case XFS_DINODE_FMT_DEV: |
176 | buf->bs_rdev = be32_to_cpu(dip->di_u.di_dev); | 172 | buf->bs_rdev = xfs_dinode_get_rdev(dic); |
177 | buf->bs_blksize = BLKDEV_IOSIZE; | 173 | buf->bs_blksize = BLKDEV_IOSIZE; |
178 | buf->bs_blocks = 0; | 174 | buf->bs_blocks = 0; |
179 | break; | 175 | break; |
@@ -287,19 +283,19 @@ xfs_bulkstat_use_dinode( | |||
287 | * to disk yet. This is a temporary hack that would require a proper | 283 | * to disk yet. This is a temporary hack that would require a proper |
288 | * fix in the future. | 284 | * fix in the future. |
289 | */ | 285 | */ |
290 | if (be16_to_cpu(dip->di_core.di_magic) != XFS_DINODE_MAGIC || | 286 | if (be16_to_cpu(dip->di_magic) != XFS_DINODE_MAGIC || |
291 | !XFS_DINODE_GOOD_VERSION(dip->di_core.di_version) || | 287 | !XFS_DINODE_GOOD_VERSION(dip->di_version) || |
292 | !dip->di_core.di_mode) | 288 | !dip->di_mode) |
293 | return 0; | 289 | return 0; |
294 | if (flags & BULKSTAT_FG_QUICK) { | 290 | if (flags & BULKSTAT_FG_QUICK) { |
295 | *dipp = dip; | 291 | *dipp = dip; |
296 | return 1; | 292 | return 1; |
297 | } | 293 | } |
298 | /* BULKSTAT_FG_INLINE: if attr fork is local, or not there, use it */ | 294 | /* BULKSTAT_FG_INLINE: if attr fork is local, or not there, use it */ |
299 | aformat = dip->di_core.di_aformat; | 295 | aformat = dip->di_aformat; |
300 | if ((XFS_DFORK_Q(dip) == 0) || | 296 | if ((XFS_DFORK_Q(dip) == 0) || |
301 | (aformat == XFS_DINODE_FMT_LOCAL) || | 297 | (aformat == XFS_DINODE_FMT_LOCAL) || |
302 | (aformat == XFS_DINODE_FMT_EXTENTS && !dip->di_core.di_anextents)) { | 298 | (aformat == XFS_DINODE_FMT_EXTENTS && !dip->di_anextents)) { |
303 | *dipp = dip; | 299 | *dipp = dip; |
304 | return 1; | 300 | return 1; |
305 | } | 301 | } |