summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/trans.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2012-12-14 13:29:56 +0100
committerSteven Whitehouse <swhiteho@redhat.com>2013-01-29 11:27:46 +0100
commit75f2b879aeb3158daf6aa95d135803f7e71df06b (patch)
tree30bf176b742d11a4e71f2f0a1e3495f45e337a75 /fs/gfs2/trans.c
parentGFS2: Separate LRU scanning from shrinker (diff)
downloadlinux-75f2b879aeb3158daf6aa95d135803f7e71df06b.tar.xz
linux-75f2b879aeb3158daf6aa95d135803f7e71df06b.zip
GFS2: Merge revoke adding functions
This moves the lo_add function for revokes into trans.c, removing a function call and making the code easier to read. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r--fs/gfs2/trans.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 413627072f36..6f3ddbcb5cc9 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -175,11 +175,19 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
{
+ struct gfs2_glock *gl = bd->bd_gl;
+ struct gfs2_trans *tr = current->journal_info;
+
BUG_ON(!list_empty(&bd->bd_list));
BUG_ON(!list_empty(&bd->bd_ail_st_list));
BUG_ON(!list_empty(&bd->bd_ail_gl_list));
lops_init_le(bd, &gfs2_revoke_lops);
- lops_add(sdp, bd);
+ tr->tr_touched = 1;
+ tr->tr_num_revoke++;
+ sdp->sd_log_num_revoke++;
+ atomic_inc(&gl->gl_revokes);
+ set_bit(GLF_LFLUSH, &gl->gl_flags);
+ list_add(&bd->bd_list, &sdp->sd_log_le_revoke);
}
void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno, unsigned int len)