diff options
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
| -rw-r--r-- | fs/xfs/xfs_ialloc.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 8f3fae1aa98a..0024892841a3 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
| @@ -138,8 +138,6 @@ xfs_ialloc_ag_alloc( | |||
| 138 | int version; /* inode version number to use */ | 138 | int version; /* inode version number to use */ |
| 139 | int isaligned; /* inode allocation at stripe unit */ | 139 | int isaligned; /* inode allocation at stripe unit */ |
| 140 | /* boundary */ | 140 | /* boundary */ |
| 141 | xfs_dinode_core_t dic; /* a dinode_core to copy to new */ | ||
| 142 | /* inodes */ | ||
| 143 | 141 | ||
| 144 | args.tp = tp; | 142 | args.tp = tp; |
| 145 | args.mp = tp->t_mountp; | 143 | args.mp = tp->t_mountp; |
| @@ -250,10 +248,6 @@ xfs_ialloc_ag_alloc( | |||
| 250 | else | 248 | else |
| 251 | version = XFS_DINODE_VERSION_1; | 249 | version = XFS_DINODE_VERSION_1; |
| 252 | 250 | ||
| 253 | memset(&dic, 0, sizeof(xfs_dinode_core_t)); | ||
| 254 | INT_SET(dic.di_magic, ARCH_CONVERT, XFS_DINODE_MAGIC); | ||
| 255 | INT_SET(dic.di_version, ARCH_CONVERT, version); | ||
| 256 | |||
| 257 | for (j = 0; j < nbufs; j++) { | 251 | for (j = 0; j < nbufs; j++) { |
| 258 | /* | 252 | /* |
| 259 | * Get the block. | 253 | * Get the block. |
| @@ -266,12 +260,13 @@ xfs_ialloc_ag_alloc( | |||
| 266 | ASSERT(fbuf); | 260 | ASSERT(fbuf); |
| 267 | ASSERT(!XFS_BUF_GETERROR(fbuf)); | 261 | ASSERT(!XFS_BUF_GETERROR(fbuf)); |
| 268 | /* | 262 | /* |
| 269 | * Loop over the inodes in this buffer. | 263 | * Set initial values for the inodes in this buffer. |
| 270 | */ | 264 | */ |
| 271 | 265 | xfs_biozero(fbuf, 0, ninodes << args.mp->m_sb.sb_inodelog); | |
| 272 | for (i = 0; i < ninodes; i++) { | 266 | for (i = 0; i < ninodes; i++) { |
| 273 | free = XFS_MAKE_IPTR(args.mp, fbuf, i); | 267 | free = XFS_MAKE_IPTR(args.mp, fbuf, i); |
| 274 | memcpy(&(free->di_core), &dic, sizeof(xfs_dinode_core_t)); | 268 | INT_SET(free->di_core.di_magic, ARCH_CONVERT, XFS_DINODE_MAGIC); |
| 269 | INT_SET(free->di_core.di_version, ARCH_CONVERT, version); | ||
| 275 | INT_SET(free->di_next_unlinked, ARCH_CONVERT, NULLAGINO); | 270 | INT_SET(free->di_next_unlinked, ARCH_CONVERT, NULLAGINO); |
| 276 | xfs_ialloc_log_di(tp, fbuf, i, | 271 | xfs_ialloc_log_di(tp, fbuf, i, |
| 277 | XFS_DI_CORE_BITS | XFS_DI_NEXT_UNLINKED); | 272 | XFS_DI_CORE_BITS | XFS_DI_NEXT_UNLINKED); |
