ALSA: hda: Initialize power_state field properly
[platform/kernel/linux-rpi.git] / fs / gfs2 / lops.c
index f2567f9..8f99b39 100644 (file)
@@ -662,8 +662,10 @@ static void revoke_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
                bd = list_entry(head->next, struct gfs2_bufdata, bd_list);
                list_del_init(&bd->bd_list);
                gl = bd->bd_gl;
-               atomic_dec(&gl->gl_revokes);
-               clear_bit(GLF_LFLUSH, &gl->gl_flags);
+               if (atomic_dec_return(&gl->gl_revokes) == 0) {
+                       clear_bit(GLF_LFLUSH, &gl->gl_flags);
+                       gfs2_glock_queue_put(gl);
+               }
                kmem_cache_free(gfs2_bufdata_cachep, bd);
        }
 }