]> err.no Git - linux-2.6/blobdiff - fs/ocfs2/journal.c
ocfs2: remove ocfs2_journal_handle journal field
[linux-2.6] / fs / ocfs2 / journal.c
index 3ef1678c893a9384e656a094214a210ca6f7676b..81fb917475fd70ba00b8c63d8592fea18cc8a864 100644 (file)
@@ -110,7 +110,7 @@ finally:
        return status;
 }
 
-struct ocfs2_journal_handle *ocfs2_alloc_handle(struct ocfs2_super *osb)
+static struct ocfs2_journal_handle *ocfs2_alloc_handle(struct ocfs2_super *osb)
 {
        struct ocfs2_journal_handle *retval = NULL;
 
@@ -122,8 +122,6 @@ struct ocfs2_journal_handle *ocfs2_alloc_handle(struct ocfs2_super *osb)
        }
        retval->k_handle = NULL;
 
-       retval->journal = osb->journal;
-
        return retval;
 }
 
@@ -195,11 +193,12 @@ done_free:
        return ERR_PTR(ret);
 }
 
-void ocfs2_commit_trans(struct ocfs2_journal_handle *handle)
+void ocfs2_commit_trans(struct ocfs2_super *osb,
+                       struct ocfs2_journal_handle *handle)
 {
        handle_t *jbd_handle;
        int retval;
-       struct ocfs2_journal *journal = handle->journal;
+       struct ocfs2_journal *journal = osb->journal;
 
        mlog_entry_void();
 
@@ -424,8 +423,7 @@ int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty)
        /* Skip recovery waits here - journal inode metadata never
         * changes in a live cluster so it can be considered an
         * exception to the rule. */
-       status = ocfs2_meta_lock_full(inode, NULL, &bh, 1,
-                                     OCFS2_META_LOCK_RECOVERY);
+       status = ocfs2_meta_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY);
        if (status < 0) {
                if (status != -ERESTARTSYS)
                        mlog(ML_ERROR, "Could not get lock on journal!\n");
@@ -1022,8 +1020,7 @@ static int ocfs2_replay_journal(struct ocfs2_super *osb,
        }
        SET_INODE_JOURNAL(inode);
 
-       status = ocfs2_meta_lock_full(inode, NULL, &bh, 1,
-                                     OCFS2_META_LOCK_RECOVERY);
+       status = ocfs2_meta_lock_full(inode, &bh, 1, OCFS2_META_LOCK_RECOVERY);
        if (status < 0) {
                mlog(0, "status returned from ocfs2_meta_lock=%d\n", status);
                if (status != -ERESTARTSYS)
@@ -1212,7 +1209,7 @@ static int ocfs2_trylock_journal(struct ocfs2_super *osb,
        SET_INODE_JOURNAL(inode);
 
        flags = OCFS2_META_LOCK_RECOVERY | OCFS2_META_LOCK_NOQUEUE;
-       status = ocfs2_meta_lock_full(inode, NULL, NULL, 1, flags);
+       status = ocfs2_meta_lock_full(inode, NULL, 1, flags);
        if (status < 0) {
                if (status != -EAGAIN)
                        mlog_errno(status);
@@ -1295,7 +1292,7 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb,
        }       
 
        mutex_lock(&orphan_dir_inode->i_mutex);
-       status = ocfs2_meta_lock(orphan_dir_inode, NULL, NULL, 0);
+       status = ocfs2_meta_lock(orphan_dir_inode, NULL, 0);
        if (status < 0) {
                mlog_errno(status);
                goto out;