diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:43 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:43 -0400 |
| commit | a890b15c0990cc8d686edcc85f5fccde71ad5ce9 (patch) | |
| tree | 73162355b58283a2531f13fbbf663809f95c1483 /fs/xfs/xfs_iget.c | |
| parent | 79fa1b677be3a985cc66b9218a4dd09818f1051b (diff) | |
| parent | 26ec634c31a11a003040e10b4d650495158632fd (diff) | |
Merge branch 'upstream'
Diffstat (limited to 'fs/xfs/xfs_iget.c')
| -rw-r--r-- | fs/xfs/xfs_iget.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index bb33113eef9f..b53854325266 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
| @@ -421,7 +421,10 @@ finish_inode: | |||
| 421 | ip->i_chash = chlnew; | 421 | ip->i_chash = chlnew; |
| 422 | chlnew->chl_ip = ip; | 422 | chlnew->chl_ip = ip; |
| 423 | chlnew->chl_blkno = ip->i_blkno; | 423 | chlnew->chl_blkno = ip->i_blkno; |
| 424 | if (ch->ch_list) | ||
| 425 | ch->ch_list->chl_prev = chlnew; | ||
| 424 | chlnew->chl_next = ch->ch_list; | 426 | chlnew->chl_next = ch->ch_list; |
| 427 | chlnew->chl_prev = NULL; | ||
| 425 | ch->ch_list = chlnew; | 428 | ch->ch_list = chlnew; |
| 426 | chlnew = NULL; | 429 | chlnew = NULL; |
| 427 | } | 430 | } |
| @@ -723,23 +726,15 @@ xfs_iextract( | |||
| 723 | ASSERT(ip->i_cnext == ip && ip->i_cprev == ip); | 726 | ASSERT(ip->i_cnext == ip && ip->i_cprev == ip); |
| 724 | ASSERT(ip->i_chash != NULL); | 727 | ASSERT(ip->i_chash != NULL); |
| 725 | chm=NULL; | 728 | chm=NULL; |
| 726 | for (chl = ch->ch_list; chl != NULL; chl = chl->chl_next) { | 729 | chl = ip->i_chash; |
| 727 | if (chl->chl_blkno == ip->i_blkno) { | 730 | if (chl->chl_prev) |
| 728 | if (chm == NULL) { | 731 | chl->chl_prev->chl_next = chl->chl_next; |
| 729 | /* first item on the list */ | 732 | else |
| 730 | ch->ch_list = chl->chl_next; | 733 | ch->ch_list = chl->chl_next; |
| 731 | } else { | 734 | if (chl->chl_next) |
| 732 | chm->chl_next = chl->chl_next; | 735 | chl->chl_next->chl_prev = chl->chl_prev; |
| 733 | } | 736 | kmem_zone_free(xfs_chashlist_zone, chl); |
| 734 | kmem_zone_free(xfs_chashlist_zone, chl); | 737 | } else { |
| 735 | break; | ||
| 736 | } else { | ||
| 737 | ASSERT(chl->chl_ip != ip); | ||
| 738 | chm = chl; | ||
| 739 | } | ||
| 740 | } | ||
| 741 | ASSERT_ALWAYS(chl != NULL); | ||
| 742 | } else { | ||
| 743 | /* delete one inode from a non-empty list */ | 738 | /* delete one inode from a non-empty list */ |
| 744 | iq = ip->i_cnext; | 739 | iq = ip->i_cnext; |
| 745 | iq->i_cprev = ip->i_cprev; | 740 | iq->i_cprev = ip->i_cprev; |
