]> err.no Git - linux-2.6/blobdiff - fs/xfs/xfs_trans_item.c
[XFS] Restore the lowspace extent allocator algorithm
[linux-2.6] / fs / xfs / xfs_trans_item.c
index 1117d600d74108f2ba9936663db4c5f758062a85..db5c83595526442cae1f2890080525aecfdbf33b 100644 (file)
@@ -21,6 +21,7 @@
 #include "xfs_log.h"
 #include "xfs_inum.h"
 #include "xfs_trans.h"
+#include "xfs_trans_priv.h"
 
 STATIC int     xfs_trans_unlock_chunk(xfs_log_item_chunk_t *,
                                        int, int, xfs_lsn_t);
@@ -160,7 +161,7 @@ xfs_trans_free_item(xfs_trans_t     *tp, xfs_log_item_desc_t *lidp)
                        licpp = &((*licpp)->lic_next);
                }
                *licpp = licp->lic_next;
-               kmem_free(licp, sizeof(xfs_log_item_chunk_t));
+               kmem_free(licp);
                tp->t_items_free -= XFS_LIC_NUM_SLOTS;
        }
 }
@@ -313,7 +314,7 @@ xfs_trans_free_items(
                ASSERT(!XFS_LIC_ARE_ALL_FREE(licp));
                (void) xfs_trans_unlock_chunk(licp, 1, abort, NULLCOMMITLSN);
                next_licp = licp->lic_next;
-               kmem_free(licp, sizeof(xfs_log_item_chunk_t));
+               kmem_free(licp);
                licp = next_licp;
        }
 
@@ -362,7 +363,7 @@ xfs_trans_unlock_items(xfs_trans_t *tp, xfs_lsn_t commit_lsn)
                next_licp = licp->lic_next;
                if (XFS_LIC_ARE_ALL_FREE(licp)) {
                        *licpp = next_licp;
-                       kmem_free(licp, sizeof(xfs_log_item_chunk_t));
+                       kmem_free(licp);
                        freed -= XFS_LIC_NUM_SLOTS;
                } else {
                        licpp = &(licp->lic_next);
@@ -493,7 +494,7 @@ xfs_trans_add_busy(xfs_trans_t *tp, xfs_agnumber_t ag, xfs_extlen_t idx)
                                break;
                        } else {
                                /* out-of-order vacancy */
-                               printk("OOO vacancy lbcp 0x%p\n", lbcp);
+                               cmn_err(CE_DEBUG, "OOO vacancy lbcp 0x%p\n", lbcp);
                                ASSERT(0);
                        }
                }
@@ -529,7 +530,7 @@ xfs_trans_free_busy(xfs_trans_t *tp)
        lbcp = tp->t_busy.lbc_next;
        while (lbcp != NULL) {
                lbcq = lbcp->lbc_next;
-               kmem_free(lbcp, sizeof(xfs_log_busy_chunk_t));
+               kmem_free(lbcp);
                lbcp = lbcq;
        }