Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210390
b: refs/heads/master
c: d513498
h: refs/heads/master
v: v3
  • Loading branch information
Mark Fasheh authored and Tao Ma committed Sep 8, 2010
1 parent 66c3b3f commit a505af3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 021960cab320ae3cc4e9aba9cca42f9f5ce785f3
refs/heads/master: d51349829c378c06ba4aa7d4b16ca23739858608
17 changes: 4 additions & 13 deletions trunk/fs/ocfs2/suballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,6 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac,
{
int status;
u16 chain;
u32 tmp_used;
u64 next_group;
struct inode *alloc_inode = ac->ac_inode;
struct buffer_head *group_bh = NULL;
Expand Down Expand Up @@ -1807,22 +1806,14 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac,
}
}

/* Ok, claim our bits now: set the info on dinode, chainlist
* and then the group */
status = ocfs2_journal_access_di(handle,
INODE_CACHE(alloc_inode),
ac->ac_bh,
OCFS2_JOURNAL_ACCESS_WRITE);
if (status < 0) {
status = ocfs2_alloc_dinode_update_counts(alloc_inode, handle,
ac->ac_bh, res->sr_bits,
chain);
if (status) {
mlog_errno(status);
goto bail;
}

tmp_used = le32_to_cpu(fe->id1.bitmap1.i_used);
fe->id1.bitmap1.i_used = cpu_to_le32(res->sr_bits + tmp_used);
le32_add_cpu(&cl->cl_recs[chain].c_free, -res->sr_bits);
ocfs2_journal_dirty(handle, ac->ac_bh);

status = ocfs2_block_group_set_bits(handle,
alloc_inode,
bg,
Expand Down

0 comments on commit a505af3

Please sign in to comment.