aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/lops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/lops.c')
-rw-r--r--fs/gfs2/lops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 11a73efa8261..4295a6a0f1e4 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -80,7 +80,7 @@ static void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh,
80 mark_buffer_dirty(bh); 80 mark_buffer_dirty(bh);
81 clear_buffer_pinned(bh); 81 clear_buffer_pinned(bh);
82 82
83 gfs2_log_lock(sdp); 83 spin_lock(&sdp->sd_ail_lock);
84 if (bd->bd_ail) { 84 if (bd->bd_ail) {
85 list_del(&bd->bd_ail_st_list); 85 list_del(&bd->bd_ail_st_list);
86 brelse(bh); 86 brelse(bh);
@@ -91,10 +91,11 @@ static void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh,
91 } 91 }
92 bd->bd_ail = ai; 92 bd->bd_ail = ai;
93 list_add(&bd->bd_ail_st_list, &ai->ai_ail1_list); 93 list_add(&bd->bd_ail_st_list, &ai->ai_ail1_list);
94 spin_unlock(&sdp->sd_ail_lock);
95
94 if (test_and_clear_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags)) 96 if (test_and_clear_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags))
95 gfs2_glock_schedule_for_reclaim(bd->bd_gl); 97 gfs2_glock_schedule_for_reclaim(bd->bd_gl);
96 trace_gfs2_pin(bd, 0); 98 trace_gfs2_pin(bd, 0);
97 gfs2_log_unlock(sdp);
98 unlock_buffer(bh); 99 unlock_buffer(bh);
99 atomic_dec(&sdp->sd_log_pinned); 100 atomic_dec(&sdp->sd_log_pinned);
100} 101}