aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-09 02:38:23 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-01-09 02:38:23 -0500
commitda733563be5a9da26fe81d9f007262d00b846e22 (patch)
treedb28291df94a2043af2123911984c5c173da4e6f /fs/xfs/xfs_ialloc.c
parent6ccbcf2cb41131f8d56ef0723bf3f7c1f8486076 (diff)
parentdab78d7924598ea4031663dd10db814e2e324928 (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/xfs_ialloc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 9f24ec28283b..169380e66057 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 */
153STATIC void 153STATIC int
154xfs_ialloc_inode_init( 154xfs_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 */
@@ -1502,7 +1505,7 @@ xfs_read_agi(
1502 return XFS_ERROR(EFSCORRUPTED); 1505 return XFS_ERROR(EFSCORRUPTED);
1503 } 1506 }
1504 1507
1505 XFS_BUF_SET_VTYPE_REF(*bpp, B_FS_AGI, XFS_AGI_REF); 1508 xfs_buf_set_ref(*bpp, XFS_AGI_REF);
1506 1509
1507 xfs_check_agi_unlinked(agi); 1510 xfs_check_agi_unlinked(agi);
1508 return 0; 1511 return 0;