aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/namei.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2010-03-25 22:09:15 -0400
committerTao Ma <tao.ma@oracle.com>2010-03-25 22:09:15 -0400
commit2b6cb576aa80611f1f6a3c88708d1e68a8d97985 (patch)
treea984f09104970133379e4d370b9f01e7f85c6f9b /fs/ocfs2/namei.c
parentba2066351b630f0205ebf725f5c81a2a07a77cd7 (diff)
ocfs2: Set suballoc_loc on allocated metadata.
Get the suballoc_loc from ocfs2_claim_new_inode() or ocfs2_claim_metadata(). Store it on the appropriate field of the block we just allocated. Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/namei.c')
-rw-r--r--fs/ocfs2/namei.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index e5434a04b88a..bfe4571a4fa1 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -472,14 +472,15 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb,
472 int status = 0; 472 int status = 0;
473 struct ocfs2_dinode *fe = NULL; 473 struct ocfs2_dinode *fe = NULL;
474 struct ocfs2_extent_list *fel; 474 struct ocfs2_extent_list *fel;
475 u64 fe_blkno = 0; 475 u64 suballoc_loc, fe_blkno = 0;
476 u16 suballoc_bit; 476 u16 suballoc_bit;
477 u16 feat; 477 u16 feat;
478 478
479 *new_fe_bh = NULL; 479 *new_fe_bh = NULL;
480 480
481 status = ocfs2_claim_new_inode(handle, dir, parent_fe_bh, 481 status = ocfs2_claim_new_inode(handle, dir, parent_fe_bh,
482 inode_ac, &suballoc_bit, &fe_blkno); 482 inode_ac, &suballoc_loc,
483 &suballoc_bit, &fe_blkno);
483 if (status < 0) { 484 if (status < 0) {
484 mlog_errno(status); 485 mlog_errno(status);
485 goto leave; 486 goto leave;
@@ -516,6 +517,7 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb,
516 fe->i_generation = cpu_to_le32(inode->i_generation); 517 fe->i_generation = cpu_to_le32(inode->i_generation);
517 fe->i_fs_generation = cpu_to_le32(osb->fs_generation); 518 fe->i_fs_generation = cpu_to_le32(osb->fs_generation);
518 fe->i_blkno = cpu_to_le64(fe_blkno); 519 fe->i_blkno = cpu_to_le64(fe_blkno);
520 fe->i_suballoc_loc = cpu_to_le64(suballoc_loc);
519 fe->i_suballoc_bit = cpu_to_le16(suballoc_bit); 521 fe->i_suballoc_bit = cpu_to_le16(suballoc_bit);
520 fe->i_suballoc_slot = cpu_to_le16(inode_ac->ac_alloc_slot); 522 fe->i_suballoc_slot = cpu_to_le16(inode_ac->ac_alloc_slot);
521 fe->i_uid = cpu_to_le32(inode->i_uid); 523 fe->i_uid = cpu_to_le32(inode->i_uid);