diff options
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r-- | fs/xfs/xfs_fsops.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 2196830bf5c0..bd9cb7f0b073 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c | |||
@@ -140,6 +140,7 @@ xfs_growfs_data_private( | |||
140 | xfs_growfs_data_t *in) /* growfs data input struct */ | 140 | xfs_growfs_data_t *in) /* growfs data input struct */ |
141 | { | 141 | { |
142 | xfs_agf_t *agf; | 142 | xfs_agf_t *agf; |
143 | struct xfs_agfl *agfl; | ||
143 | xfs_agi_t *agi; | 144 | xfs_agi_t *agi; |
144 | xfs_agnumber_t agno; | 145 | xfs_agnumber_t agno; |
145 | xfs_extlen_t agsize; | 146 | xfs_extlen_t agsize; |
@@ -207,7 +208,7 @@ xfs_growfs_data_private( | |||
207 | nfree = 0; | 208 | nfree = 0; |
208 | for (agno = nagcount - 1; agno >= oagcount; agno--, new -= agsize) { | 209 | for (agno = nagcount - 1; agno >= oagcount; agno--, new -= agsize) { |
209 | /* | 210 | /* |
210 | * AG freelist header block | 211 | * AG freespace header block |
211 | */ | 212 | */ |
212 | bp = xfs_growfs_get_hdr_buf(mp, | 213 | bp = xfs_growfs_get_hdr_buf(mp, |
213 | XFS_AG_DADDR(mp, agno, XFS_AGF_DADDR(mp)), | 214 | XFS_AG_DADDR(mp, agno, XFS_AGF_DADDR(mp)), |
@@ -244,6 +245,26 @@ xfs_growfs_data_private( | |||
244 | goto error0; | 245 | goto error0; |
245 | 246 | ||
246 | /* | 247 | /* |
248 | * AG freelist header block | ||
249 | */ | ||
250 | bp = xfs_growfs_get_hdr_buf(mp, | ||
251 | XFS_AG_DADDR(mp, agno, XFS_AGFL_DADDR(mp)), | ||
252 | XFS_FSS_TO_BB(mp, 1), 0); | ||
253 | if (!bp) { | ||
254 | error = ENOMEM; | ||
255 | goto error0; | ||
256 | } | ||
257 | |||
258 | agfl = XFS_BUF_TO_AGFL(bp); | ||
259 | for (bucket = 0; bucket < XFS_AGFL_SIZE(mp); bucket++) | ||
260 | agfl->agfl_bno[bucket] = cpu_to_be32(NULLAGBLOCK); | ||
261 | |||
262 | error = xfs_bwrite(bp); | ||
263 | xfs_buf_relse(bp); | ||
264 | if (error) | ||
265 | goto error0; | ||
266 | |||
267 | /* | ||
247 | * AG inode header block | 268 | * AG inode header block |
248 | */ | 269 | */ |
249 | bp = xfs_growfs_get_hdr_buf(mp, | 270 | bp = xfs_growfs_get_hdr_buf(mp, |