]> err.no Git - linux-2.6/blobdiff - fs/ocfs2/journal.c
ocfs2: fix compiler warnings in dlm_convert_lock_handler()
[linux-2.6] / fs / ocfs2 / journal.c
index ae3440ca083c364f0f1b2f70274ad6278ba5a47e..3fe8781c22cb68fedf6c5d8189c9aab3f88fa0d1 100644 (file)
@@ -117,7 +117,7 @@ struct ocfs2_journal_handle *ocfs2_alloc_handle(struct ocfs2_super *osb)
 {
        struct ocfs2_journal_handle *retval = NULL;
 
-       retval = kcalloc(1, sizeof(*retval), GFP_KERNEL);
+       retval = kcalloc(1, sizeof(*retval), GFP_NOFS);
        if (!retval) {
                mlog(ML_ERROR, "Failed to allocate memory for journal "
                     "handle!\n");
@@ -222,8 +222,7 @@ void ocfs2_handle_add_inode(struct ocfs2_journal_handle *handle,
        BUG_ON(!list_empty(&OCFS2_I(inode)->ip_handle_list));
 
        OCFS2_I(inode)->ip_handle = handle;
-       list_del(&(OCFS2_I(inode)->ip_handle_list));
-       list_add_tail(&(OCFS2_I(inode)->ip_handle_list), &(handle->inode_list));
+       list_move_tail(&(OCFS2_I(inode)->ip_handle_list), &(handle->inode_list));
 }
 
 static void ocfs2_handle_unlock_inodes(struct ocfs2_journal_handle *handle)
@@ -377,7 +376,7 @@ int ocfs2_journal_access(struct ocfs2_journal_handle *handle,
        BUG_ON(!bh);
        BUG_ON(!(handle->flags & OCFS2_HANDLE_STARTED));
 
-       mlog_entry("bh->b_blocknr=%llu, type=%d (\"%s\"), bh->b_size = %hu\n",
+       mlog_entry("bh->b_blocknr=%llu, type=%d (\"%s\"), bh->b_size = %zu\n",
                   (unsigned long long)bh->b_blocknr, type,
                   (type == OCFS2_JOURNAL_ACCESS_CREATE) ?
                   "OCFS2_JOURNAL_ACCESS_CREATE" :
@@ -582,7 +581,8 @@ int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty)
        }
 
        mlog(0, "inode->i_size = %lld\n", inode->i_size);
-       mlog(0, "inode->i_blocks = %lu\n", inode->i_blocks);
+       mlog(0, "inode->i_blocks = %llu\n",
+                       (unsigned long long)inode->i_blocks);
        mlog(0, "inode->ip_clusters = %u\n", OCFS2_I(inode)->ip_clusters);
 
        /* call the kernels journal init function now */
@@ -850,8 +850,9 @@ static int ocfs2_force_read_journal(struct inode *inode)
 
        memset(bhs, 0, sizeof(struct buffer_head *) * CONCURRENT_JOURNAL_FILL);
 
-       mlog(0, "Force reading %lu blocks\n",
-            (inode->i_blocks >> (inode->i_sb->s_blocksize_bits - 9)));
+       mlog(0, "Force reading %llu blocks\n",
+               (unsigned long long)(inode->i_blocks >>
+                       (inode->i_sb->s_blocksize_bits - 9)));
 
        v_blkno = 0;
        while (v_blkno <
@@ -868,9 +869,11 @@ static int ocfs2_force_read_journal(struct inode *inode)
                if (p_blocks > CONCURRENT_JOURNAL_FILL)
                        p_blocks = CONCURRENT_JOURNAL_FILL;
 
+               /* We are reading journal data which should not
+                * be put in the uptodate cache */
                status = ocfs2_read_blocks(OCFS2_SB(inode->i_sb),
                                           p_blkno, p_blocks, bhs, 0,
-                                          inode);
+                                          NULL);
                if (status < 0) {
                        mlog_errno(status);
                        goto bail;
@@ -980,7 +983,7 @@ static void ocfs2_queue_recovery_completion(struct ocfs2_journal *journal,
 {
        struct ocfs2_la_recovery_item *item;
 
-       item = kmalloc(sizeof(struct ocfs2_la_recovery_item), GFP_KERNEL);
+       item = kmalloc(sizeof(struct ocfs2_la_recovery_item), GFP_NOFS);
        if (!item) {
                /* Though we wish to avoid it, we are in fact safe in
                 * skipping local alloc cleanup as fsck.ocfs2 is more