diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 12:14:51 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 12:14:51 -0400 |
| commit | f26e51f67ae6a75ffc57b96cf5fe096f75e778cb (patch) | |
| tree | 1e848187885426430cc93bffaadc539312ce636d /fs/gfs2/trans.c | |
| parent | 1462222b76a09a24b240563a51d5f9fbea8bd3e1 (diff) | |
| parent | c36258b5925e6cf6bf72904635100593573bfcff (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (51 commits)
[DLM] block dlm_recv in recovery transition
[DLM] don't overwrite castparam if it's NULL
[GFS2] Get superblock a different way
[GFS2] Don't try to remove buffers that don't exist
[GFS2] Alternate gfs2_iget to avoid looking up inodes being freed
[GFS2] Data corruption fix
[GFS2] Clean up journaled data writing
[GFS2] GFS2: chmod hung - fix race in thread creation
[DLM] Make dlm_sendd cond_resched more
[GFS2] Move inode deletion out of blocking_cb
[GFS2] flocks from same process trip kernel BUG at fs/gfs2/glock.c:1118!
[GFS2] Clean up gfs2_trans_add_revoke()
[GFS2] Use slab operations for all gfs2_bufdata allocations
[GFS2] Replace revoke structure with bufdata structure
[GFS2] Fix ordering of dirty/journal for ordered buffer unstuffing
[GFS2] Clean up ordered write code
[GFS2] Move pin/unpin into lops.c, clean up locking
[GFS2] Don't mark jdata dirty in gfs2_unstuffer_page()
[GFS2] Introduce gfs2_remove_from_ail
[GFS2] Correct lock ordering in unlink
...
Diffstat (limited to 'fs/gfs2/trans.c')
| -rw-r--r-- | fs/gfs2/trans.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index f8dabf8446bb..717983e2c2ae 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c | |||
| @@ -142,25 +142,25 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta) | |||
| 142 | lops_add(sdp, &bd->bd_le); | 142 | lops_add(sdp, &bd->bd_le); |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, u64 blkno) | 145 | void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd) |
| 146 | { | 146 | { |
| 147 | struct gfs2_revoke *rv = kmalloc(sizeof(struct gfs2_revoke), | 147 | BUG_ON(!list_empty(&bd->bd_le.le_list)); |
| 148 | GFP_NOFS | __GFP_NOFAIL); | 148 | BUG_ON(!list_empty(&bd->bd_ail_st_list)); |
| 149 | lops_init_le(&rv->rv_le, &gfs2_revoke_lops); | 149 | BUG_ON(!list_empty(&bd->bd_ail_gl_list)); |
| 150 | rv->rv_blkno = blkno; | 150 | lops_init_le(&bd->bd_le, &gfs2_revoke_lops); |
| 151 | lops_add(sdp, &rv->rv_le); | 151 | lops_add(sdp, &bd->bd_le); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno) | 154 | void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno) |
| 155 | { | 155 | { |
| 156 | struct gfs2_revoke *rv; | 156 | struct gfs2_bufdata *bd; |
| 157 | int found = 0; | 157 | int found = 0; |
| 158 | 158 | ||
| 159 | gfs2_log_lock(sdp); | 159 | gfs2_log_lock(sdp); |
| 160 | 160 | ||
| 161 | list_for_each_entry(rv, &sdp->sd_log_le_revoke, rv_le.le_list) { | 161 | list_for_each_entry(bd, &sdp->sd_log_le_revoke, bd_le.le_list) { |
| 162 | if (rv->rv_blkno == blkno) { | 162 | if (bd->bd_blkno == blkno) { |
| 163 | list_del(&rv->rv_le.le_list); | 163 | list_del_init(&bd->bd_le.le_list); |
| 164 | gfs2_assert_withdraw(sdp, sdp->sd_log_num_revoke); | 164 | gfs2_assert_withdraw(sdp, sdp->sd_log_num_revoke); |
| 165 | sdp->sd_log_num_revoke--; | 165 | sdp->sd_log_num_revoke--; |
| 166 | found = 1; | 166 | found = 1; |
| @@ -172,7 +172,7 @@ void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno) | |||
| 172 | 172 | ||
| 173 | if (found) { | 173 | if (found) { |
| 174 | struct gfs2_trans *tr = current->journal_info; | 174 | struct gfs2_trans *tr = current->journal_info; |
| 175 | kfree(rv); | 175 | kmem_cache_free(gfs2_bufdata_cachep, bd); |
| 176 | tr->tr_num_revoke_rm++; | 176 | tr->tr_num_revoke_rm++; |
| 177 | } | 177 | } |
| 178 | } | 178 | } |
