]> err.no Git - linux-2.6/blobdiff - fs/xfs/xfs_log_recover.c
[PATCH] Separate pci bits out of struct device_node
[linux-2.6] / fs / xfs / xfs_log_recover.c
index 91d764a5a9b27c274bf4b49835c6463b47312a06..14faabaabf29150c902d33a41a4252346623f464 100644 (file)
@@ -1387,7 +1387,7 @@ xlog_recover_add_to_cont_trans(
        old_ptr = item->ri_buf[item->ri_cnt-1].i_addr;
        old_len = item->ri_buf[item->ri_cnt-1].i_len;
 
-       ptr = kmem_realloc(old_ptr, len+old_len, old_len, 0);
+       ptr = kmem_realloc(old_ptr, len+old_len, old_len, 0u);
        memcpy(&ptr[old_len], dp, len); /* d, s, l */
        item->ri_buf[item->ri_cnt-1].i_len += len;
        item->ri_buf[item->ri_cnt-1].i_addr = ptr;
@@ -2747,7 +2747,6 @@ xlog_recover_do_efd_trans(
        xfs_efi_log_item_t      *efip = NULL;
        xfs_log_item_t          *lip;
        int                     gen;
-       int                     nexts;
        __uint64_t              efi_id;
        SPLDECL(s);
 
@@ -2782,22 +2781,15 @@ xlog_recover_do_efd_trans(
                }
                lip = xfs_trans_next_ail(mp, lip, &gen, NULL);
        }
-       if (lip == NULL) {
-               AIL_UNLOCK(mp, s);
-       }
 
        /*
         * If we found it, then free it up.  If it wasn't there, it
         * must have been overwritten in the log.  Oh well.
         */
        if (lip != NULL) {
-               nexts = efip->efi_format.efi_nextents;
-               if (nexts > XFS_EFI_MAX_FAST_EXTENTS) {
-                       kmem_free(lip, sizeof(xfs_efi_log_item_t) +
-                                 ((nexts - 1) * sizeof(xfs_extent_t)));
-               } else {
-                       kmem_zone_free(xfs_efi_zone, efip);
-               }
+               xfs_efi_item_free(efip);
+       } else {
+               AIL_UNLOCK(mp, s);
        }
 }