diff options
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 9f24ec28283b..207e0b0c0730 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -150,7 +150,7 @@ xfs_check_agi_freecount( | |||
150 | /* | 150 | /* |
151 | * Initialise a new set of inodes. | 151 | * Initialise a new set of inodes. |
152 | */ | 152 | */ |
153 | STATIC void | 153 | STATIC int |
154 | xfs_ialloc_inode_init( | 154 | xfs_ialloc_inode_init( |
155 | struct xfs_mount *mp, | 155 | struct xfs_mount *mp, |
156 | struct xfs_trans *tp, | 156 | struct xfs_trans *tp, |
@@ -202,8 +202,8 @@ xfs_ialloc_inode_init( | |||
202 | fbuf = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, | 202 | fbuf = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, |
203 | mp->m_bsize * blks_per_cluster, | 203 | mp->m_bsize * blks_per_cluster, |
204 | XBF_LOCK); | 204 | XBF_LOCK); |
205 | ASSERT(!xfs_buf_geterror(fbuf)); | 205 | if (!fbuf) |
206 | 206 | return ENOMEM; | |
207 | /* | 207 | /* |
208 | * Initialize all inodes in this buffer and then log them. | 208 | * Initialize all inodes in this buffer and then log them. |
209 | * | 209 | * |
@@ -225,6 +225,7 @@ xfs_ialloc_inode_init( | |||
225 | } | 225 | } |
226 | xfs_trans_inode_alloc_buf(tp, fbuf); | 226 | xfs_trans_inode_alloc_buf(tp, fbuf); |
227 | } | 227 | } |
228 | return 0; | ||
228 | } | 229 | } |
229 | 230 | ||
230 | /* | 231 | /* |
@@ -369,9 +370,11 @@ xfs_ialloc_ag_alloc( | |||
369 | * rather than a linear progression to prevent the next generation | 370 | * rather than a linear progression to prevent the next generation |
370 | * number from being easily guessable. | 371 | * number from being easily guessable. |
371 | */ | 372 | */ |
372 | xfs_ialloc_inode_init(args.mp, tp, agno, args.agbno, args.len, | 373 | error = xfs_ialloc_inode_init(args.mp, tp, agno, args.agbno, |
373 | random32()); | 374 | args.len, random32()); |
374 | 375 | ||
376 | if (error) | ||
377 | return error; | ||
375 | /* | 378 | /* |
376 | * Convert the results. | 379 | * Convert the results. |
377 | */ | 380 | */ |