]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - fs/ocfs2/alloc.c
ocfs2: Remove EXIT from masklog.
[mirror_ubuntu-hirsute-kernel.git] / fs / ocfs2 / alloc.c
index e4984e259cb6b9eec82ed22ae376e51fad986029..80ffbe3dd32f48adef47d9c62715eed727b10e01 100644 (file)
@@ -965,8 +965,6 @@ int ocfs2_num_free_extents(struct ocfs2_super *osb,
        struct buffer_head *eb_bh = NULL;
        u64 last_eb_blk = 0;
 
-       mlog_entry_void();
-
        el = et->et_root_el;
        last_eb_blk = ocfs2_et_get_last_eb_blk(et);
 
@@ -987,7 +985,7 @@ int ocfs2_num_free_extents(struct ocfs2_super *osb,
 bail:
        brelse(eb_bh);
 
-       mlog_exit(retval);
+       mlog(0, "retval = %d\n", retval);
        return retval;
 }
 
@@ -1010,8 +1008,6 @@ static int ocfs2_create_new_meta_bhs(handle_t *handle,
                OCFS2_SB(ocfs2_metadata_cache_get_super(et->et_ci));
        struct ocfs2_extent_block *eb;
 
-       mlog_entry_void();
-
        count = 0;
        while (count < wanted) {
                status = ocfs2_claim_metadata(handle,
@@ -1074,8 +1070,8 @@ bail:
                        brelse(bhs[i]);
                        bhs[i] = NULL;
                }
+               mlog_errno(status);
        }
-       mlog_exit(status);
        return status;
 }
 
@@ -1173,8 +1169,6 @@ static int ocfs2_add_branch(handle_t *handle,
        struct ocfs2_extent_list  *el;
        u32 new_cpos, root_end;
 
-       mlog_entry_void();
-
        BUG_ON(!last_eb_bh || !*last_eb_bh);
 
        if (eb_bh) {
@@ -1332,7 +1326,6 @@ bail:
                kfree(new_eb_bhs);
        }
 
-       mlog_exit(status);
        return status;
 }
 
@@ -1353,8 +1346,6 @@ static int ocfs2_shift_tree_depth(handle_t *handle,
        struct ocfs2_extent_list  *root_el;
        struct ocfs2_extent_list  *eb_el;
 
-       mlog_entry_void();
-
        status = ocfs2_create_new_meta_bhs(handle, et, 1, meta_ac,
                                           &new_eb_bh);
        if (status < 0) {
@@ -1415,7 +1406,6 @@ static int ocfs2_shift_tree_depth(handle_t *handle,
 bail:
        brelse(new_eb_bh);
 
-       mlog_exit(status);
        return status;
 }
 
@@ -1446,8 +1436,6 @@ static int ocfs2_find_branch_target(struct ocfs2_extent_tree *et,
        struct buffer_head *bh = NULL;
        struct buffer_head *lowest_bh = NULL;
 
-       mlog_entry_void();
-
        *target_bh = NULL;
 
        el = et->et_root_el;
@@ -1503,7 +1491,6 @@ static int ocfs2_find_branch_target(struct ocfs2_extent_tree *et,
 bail:
        brelse(bh);
 
-       mlog_exit(status);
        return status;
 }
 
@@ -4562,7 +4549,7 @@ static int ocfs2_figure_insert_type(struct ocfs2_extent_tree *et,
                                              ocfs2_et_get_last_eb_blk(et),
                                              &bh);
                if (ret) {
-                       mlog_exit(ret);
+                       mlog_errno(ret);
                        goto out;
                }
                eb = (struct ocfs2_extent_block *) bh->b_data;
@@ -4726,7 +4713,6 @@ int ocfs2_insert_extent(handle_t *handle,
 bail:
        brelse(last_eb_bh);
 
-       mlog_exit(status);
        return status;
 }
 
@@ -4828,7 +4814,6 @@ int ocfs2_add_clusters_in_btree(handle_t *handle,
        }
 
 leave:
-       mlog_exit(status);
        if (reason_ret)
                *reason_ret = reason;
        return status;
@@ -5039,7 +5024,7 @@ int ocfs2_split_extent(handle_t *handle,
                                              ocfs2_et_get_last_eb_blk(et),
                                              &last_eb_bh);
                if (ret) {
-                       mlog_exit(ret);
+                       mlog_errno(ret);
                        goto out;
                }
 
@@ -5795,8 +5780,8 @@ int ocfs2_truncate_log_append(struct ocfs2_super *osb,
        struct ocfs2_dinode *di;
        struct ocfs2_truncate_log *tl;
 
-       mlog_entry("start_blk = %llu, num_clusters = %u\n",
-                  (unsigned long long)start_blk, num_clusters);
+       mlog(0, "start_blk = %llu, num_clusters = %u\n",
+            (unsigned long long)start_blk, num_clusters);
 
        BUG_ON(mutex_trylock(&tl_inode->i_mutex));
 
@@ -5859,7 +5844,6 @@ int ocfs2_truncate_log_append(struct ocfs2_super *osb,
 
        osb->truncated_clusters += num_clusters;
 bail:
-       mlog_exit(status);
        return status;
 }
 
@@ -5878,8 +5862,6 @@ static int ocfs2_replay_truncate_records(struct ocfs2_super *osb,
        struct inode *tl_inode = osb->osb_tl_inode;
        struct buffer_head *tl_bh = osb->osb_tl_bh;
 
-       mlog_entry_void();
-
        di = (struct ocfs2_dinode *) tl_bh->b_data;
        tl = &di->id2.i_dealloc;
        i = le16_to_cpu(tl->tl_used) - 1;
@@ -5932,7 +5914,6 @@ static int ocfs2_replay_truncate_records(struct ocfs2_super *osb,
        osb->truncated_clusters = 0;
 
 bail:
-       mlog_exit(status);
        return status;
 }
 
@@ -5949,8 +5930,6 @@ int __ocfs2_flush_truncate_log(struct ocfs2_super *osb)
        struct ocfs2_dinode *di;
        struct ocfs2_truncate_log *tl;
 
-       mlog_entry_void();
-
        BUG_ON(mutex_trylock(&tl_inode->i_mutex));
 
        di = (struct ocfs2_dinode *) tl_bh->b_data;
@@ -6009,7 +5988,6 @@ out_mutex:
        iput(data_alloc_inode);
 
 out:
-       mlog_exit(status);
        return status;
 }
 
@@ -6032,15 +6010,11 @@ static void ocfs2_truncate_log_worker(struct work_struct *work)
                container_of(work, struct ocfs2_super,
                             osb_truncate_log_wq.work);
 
-       mlog_entry_void();
-
        status = ocfs2_flush_truncate_log(osb);
        if (status < 0)
                mlog_errno(status);
        else
                ocfs2_init_steal_slots(osb);
-
-       mlog_exit(status);
 }
 
 #define OCFS2_TRUNCATE_LOG_FLUSH_INTERVAL (2 * HZ)
@@ -6086,7 +6060,6 @@ static int ocfs2_get_truncate_log_info(struct ocfs2_super *osb,
        *tl_inode = inode;
        *tl_bh    = bh;
 bail:
-       mlog_exit(status);
        return status;
 }
 
@@ -6157,9 +6130,9 @@ bail:
        if (status < 0 && (*tl_copy)) {
                kfree(*tl_copy);
                *tl_copy = NULL;
+               mlog_errno(status);
        }
 
-       mlog_exit(status);
        return status;
 }
 
@@ -6174,8 +6147,6 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb,
        struct inode *tl_inode = osb->osb_tl_inode;
        struct ocfs2_truncate_log *tl;
 
-       mlog_entry_void();
-
        if (OCFS2_I(tl_inode)->ip_blkno == le64_to_cpu(tl_copy->i_blkno)) {
                mlog(ML_ERROR, "Asked to recover my own truncate log!\n");
                return -EINVAL;
@@ -6219,7 +6190,6 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb,
 bail_up:
        mutex_unlock(&tl_inode->i_mutex);
 
-       mlog_exit(status);
        return status;
 }
 
@@ -6228,8 +6198,6 @@ void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)
        int status;
        struct inode *tl_inode = osb->osb_tl_inode;
 
-       mlog_entry_void();
-
        if (tl_inode) {
                cancel_delayed_work(&osb->osb_truncate_log_wq);
                flush_workqueue(ocfs2_wq);
@@ -6241,8 +6209,6 @@ void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)
                brelse(osb->osb_tl_bh);
                iput(osb->osb_tl_inode);
        }
-
-       mlog_exit_void();
 }
 
 int ocfs2_truncate_log_init(struct ocfs2_super *osb)
@@ -6251,8 +6217,6 @@ int ocfs2_truncate_log_init(struct ocfs2_super *osb)
        struct inode *tl_inode = NULL;
        struct buffer_head *tl_bh = NULL;
 
-       mlog_entry_void();
-
        status = ocfs2_get_truncate_log_info(osb,
                                             osb->slot_num,
                                             &tl_inode,
@@ -6268,7 +6232,6 @@ int ocfs2_truncate_log_init(struct ocfs2_super *osb)
        osb->osb_tl_bh    = tl_bh;
        osb->osb_tl_inode = tl_inode;
 
-       mlog_exit(status);
        return status;
 }
 
@@ -7005,8 +6968,6 @@ int ocfs2_commit_truncate(struct ocfs2_super *osb,
        struct ocfs2_extent_tree et;
        struct ocfs2_cached_dealloc_ctxt dealloc;
 
-       mlog_entry_void();
-
        ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), di_bh);
        ocfs2_init_dealloc_ctxt(&dealloc);
 
@@ -7136,7 +7097,6 @@ bail:
 
        ocfs2_free_path(path);
 
-       mlog_exit(status);
        return status;
 }