]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/gfs2/lops.c
fat: Fix and cleanup timestamp conversion
[linux-2.6-omap-h63xx.git] / fs / gfs2 / lops.c
index fae59d69d01a30d54df00b49b74d97d07fe1c0c2..4390f6f4047d3466c60899d4b1d2526de985d450 100644 (file)
@@ -152,21 +152,6 @@ out:
        unlock_buffer(bd->bd_bh);
 }
 
-static void buf_lo_incore_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
-{
-       struct list_head *head = &tr->tr_list_buf;
-       struct gfs2_bufdata *bd;
-
-       gfs2_log_lock(sdp);
-       while (!list_empty(head)) {
-               bd = list_entry(head->next, struct gfs2_bufdata, bd_list_tr);
-               list_del_init(&bd->bd_list_tr);
-               tr->tr_num_buf--;
-       }
-       gfs2_log_unlock(sdp);
-       gfs2_assert_warn(sdp, !tr->tr_num_buf);
-}
-
 static void buf_lo_before_commit(struct gfs2_sbd *sdp)
 {
        struct buffer_head *bh;
@@ -419,8 +404,10 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
                        blkno = be64_to_cpu(*(__be64 *)(bh->b_data + offset));
 
                        error = gfs2_revoke_add(sdp, blkno, start);
-                       if (error < 0)
+                       if (error < 0) {
+                               brelse(bh);
                                return error;
+                       }
                        else if (error)
                                sdp->sd_found_revokes++;
 
@@ -737,7 +724,6 @@ static void databuf_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
 
 const struct gfs2_log_operations gfs2_buf_lops = {
        .lo_add = buf_lo_add,
-       .lo_incore_commit = buf_lo_incore_commit,
        .lo_before_commit = buf_lo_before_commit,
        .lo_after_commit = buf_lo_after_commit,
        .lo_before_scan = buf_lo_before_scan,
@@ -763,7 +749,6 @@ const struct gfs2_log_operations gfs2_rg_lops = {
 
 const struct gfs2_log_operations gfs2_databuf_lops = {
        .lo_add = databuf_lo_add,
-       .lo_incore_commit = buf_lo_incore_commit,
        .lo_before_commit = databuf_lo_before_commit,
        .lo_after_commit = databuf_lo_after_commit,
        .lo_scan_elements = databuf_lo_scan_elements,