Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5278
b: refs/heads/master
c: 18190cc
h: refs/heads/master
v: v3
  • Loading branch information
Dave Kleikamp committed Jul 26, 2005
1 parent e978c19 commit e1f76f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: c2783f3a625b2aba943ef94623e277557a91a448
refs/heads/master: 18190cc08d70a6ec8ef69f0f6ede021f7cb3f9b8
13 changes: 9 additions & 4 deletions trunk/fs/jfs/jfs_dtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,12 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot)
* It's time to move the inline table to an external
* page and begin to build the xtree
*/
if (DQUOT_ALLOC_BLOCK(ip, sbi->nbperpage) ||
dbAlloc(ip, 0, sbi->nbperpage, &xaddr))
goto clean_up; /* No space */
if (DQUOT_ALLOC_BLOCK(ip, sbi->nbperpage))
goto clean_up;
if (dbAlloc(ip, 0, sbi->nbperpage, &xaddr)) {
DQUOT_FREE_BLOCK(ip, sbi->nbperpage);
goto clean_up;
}

/*
* Save the table, we're going to overwrite it with the
Expand All @@ -397,13 +400,15 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot)
xtInitRoot(tid, ip);

/*
* Allocate the first block & add it to the xtree
* Add the first block to the xtree
*/
if (xtInsert(tid, ip, 0, 0, sbi->nbperpage, &xaddr, 0)) {
/* This really shouldn't fail */
jfs_warn("add_index: xtInsert failed!");
memcpy(&jfs_ip->i_dirtable, temp_table,
sizeof (temp_table));
dbFree(ip, xaddr, sbi->nbperpage);
DQUOT_FREE_BLOCK(ip, sbi->nbperpage);
goto clean_up;
}
ip->i_size = PSIZE;
Expand Down

0 comments on commit e1f76f8

Please sign in to comment.