diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2008-05-19 02:31:57 -0400 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-07-28 02:58:07 -0400 |
commit | f0e2d93c29dc39ffd24cac180a19d48f700c0706 (patch) | |
tree | 5bfac66c6a5cda98373eea222834a37877a590f9 /fs/xfs/xfs_inode.c | |
parent | 7c12f296500e1157872ef45b3f3bb06b4b73f1c1 (diff) |
[XFS] Remove unused arg from kmem_free()
kmem_free() function takes (ptr, size) arguments but doesn't actually use
second one.
This patch removes size argument from all callsites.
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31050a
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index e569bf5d6cf0..4b21490334b1 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -2258,7 +2258,7 @@ xfs_ifree_cluster( | |||
2258 | xfs_trans_binval(tp, bp); | 2258 | xfs_trans_binval(tp, bp); |
2259 | } | 2259 | } |
2260 | 2260 | ||
2261 | kmem_free(ip_found, ninodes * sizeof(xfs_inode_t *)); | 2261 | kmem_free(ip_found); |
2262 | xfs_put_perag(mp, pag); | 2262 | xfs_put_perag(mp, pag); |
2263 | } | 2263 | } |
2264 | 2264 | ||
@@ -2470,7 +2470,7 @@ xfs_iroot_realloc( | |||
2470 | (int)new_size); | 2470 | (int)new_size); |
2471 | memcpy(np, op, new_max * (uint)sizeof(xfs_dfsbno_t)); | 2471 | memcpy(np, op, new_max * (uint)sizeof(xfs_dfsbno_t)); |
2472 | } | 2472 | } |
2473 | kmem_free(ifp->if_broot, ifp->if_broot_bytes); | 2473 | kmem_free(ifp->if_broot); |
2474 | ifp->if_broot = new_broot; | 2474 | ifp->if_broot = new_broot; |
2475 | ifp->if_broot_bytes = (int)new_size; | 2475 | ifp->if_broot_bytes = (int)new_size; |
2476 | ASSERT(ifp->if_broot_bytes <= | 2476 | ASSERT(ifp->if_broot_bytes <= |
@@ -2514,7 +2514,7 @@ xfs_idata_realloc( | |||
2514 | 2514 | ||
2515 | if (new_size == 0) { | 2515 | if (new_size == 0) { |
2516 | if (ifp->if_u1.if_data != ifp->if_u2.if_inline_data) { | 2516 | if (ifp->if_u1.if_data != ifp->if_u2.if_inline_data) { |
2517 | kmem_free(ifp->if_u1.if_data, ifp->if_real_bytes); | 2517 | kmem_free(ifp->if_u1.if_data); |
2518 | } | 2518 | } |
2519 | ifp->if_u1.if_data = NULL; | 2519 | ifp->if_u1.if_data = NULL; |
2520 | real_size = 0; | 2520 | real_size = 0; |
@@ -2529,7 +2529,7 @@ xfs_idata_realloc( | |||
2529 | ASSERT(ifp->if_real_bytes != 0); | 2529 | ASSERT(ifp->if_real_bytes != 0); |
2530 | memcpy(ifp->if_u2.if_inline_data, ifp->if_u1.if_data, | 2530 | memcpy(ifp->if_u2.if_inline_data, ifp->if_u1.if_data, |
2531 | new_size); | 2531 | new_size); |
2532 | kmem_free(ifp->if_u1.if_data, ifp->if_real_bytes); | 2532 | kmem_free(ifp->if_u1.if_data); |
2533 | ifp->if_u1.if_data = ifp->if_u2.if_inline_data; | 2533 | ifp->if_u1.if_data = ifp->if_u2.if_inline_data; |
2534 | } | 2534 | } |
2535 | real_size = 0; | 2535 | real_size = 0; |
@@ -2636,7 +2636,7 @@ xfs_idestroy_fork( | |||
2636 | 2636 | ||
2637 | ifp = XFS_IFORK_PTR(ip, whichfork); | 2637 | ifp = XFS_IFORK_PTR(ip, whichfork); |
2638 | if (ifp->if_broot != NULL) { | 2638 | if (ifp->if_broot != NULL) { |
2639 | kmem_free(ifp->if_broot, ifp->if_broot_bytes); | 2639 | kmem_free(ifp->if_broot); |
2640 | ifp->if_broot = NULL; | 2640 | ifp->if_broot = NULL; |
2641 | } | 2641 | } |
2642 | 2642 | ||
@@ -2650,7 +2650,7 @@ xfs_idestroy_fork( | |||
2650 | if ((ifp->if_u1.if_data != ifp->if_u2.if_inline_data) && | 2650 | if ((ifp->if_u1.if_data != ifp->if_u2.if_inline_data) && |
2651 | (ifp->if_u1.if_data != NULL)) { | 2651 | (ifp->if_u1.if_data != NULL)) { |
2652 | ASSERT(ifp->if_real_bytes != 0); | 2652 | ASSERT(ifp->if_real_bytes != 0); |
2653 | kmem_free(ifp->if_u1.if_data, ifp->if_real_bytes); | 2653 | kmem_free(ifp->if_u1.if_data); |
2654 | ifp->if_u1.if_data = NULL; | 2654 | ifp->if_u1.if_data = NULL; |
2655 | ifp->if_real_bytes = 0; | 2655 | ifp->if_real_bytes = 0; |
2656 | } | 2656 | } |
@@ -3058,7 +3058,7 @@ xfs_iflush_cluster( | |||
3058 | 3058 | ||
3059 | out_free: | 3059 | out_free: |
3060 | read_unlock(&pag->pag_ici_lock); | 3060 | read_unlock(&pag->pag_ici_lock); |
3061 | kmem_free(ilist, ilist_size); | 3061 | kmem_free(ilist); |
3062 | return 0; | 3062 | return 0; |
3063 | 3063 | ||
3064 | 3064 | ||
@@ -3102,7 +3102,7 @@ cluster_corrupt_out: | |||
3102 | * Unlocks the flush lock | 3102 | * Unlocks the flush lock |
3103 | */ | 3103 | */ |
3104 | xfs_iflush_abort(iq); | 3104 | xfs_iflush_abort(iq); |
3105 | kmem_free(ilist, ilist_size); | 3105 | kmem_free(ilist); |
3106 | return XFS_ERROR(EFSCORRUPTED); | 3106 | return XFS_ERROR(EFSCORRUPTED); |
3107 | } | 3107 | } |
3108 | 3108 | ||
@@ -3836,7 +3836,7 @@ xfs_iext_add_indirect_multi( | |||
3836 | erp = xfs_iext_irec_new(ifp, erp_idx); | 3836 | erp = xfs_iext_irec_new(ifp, erp_idx); |
3837 | } | 3837 | } |
3838 | memmove(&erp->er_extbuf[i], nex2_ep, byte_diff); | 3838 | memmove(&erp->er_extbuf[i], nex2_ep, byte_diff); |
3839 | kmem_free(nex2_ep, byte_diff); | 3839 | kmem_free(nex2_ep); |
3840 | erp->er_extcount += nex2; | 3840 | erp->er_extcount += nex2; |
3841 | xfs_iext_irec_update_extoffs(ifp, erp_idx + 1, nex2); | 3841 | xfs_iext_irec_update_extoffs(ifp, erp_idx + 1, nex2); |
3842 | } | 3842 | } |
@@ -4112,7 +4112,7 @@ xfs_iext_direct_to_inline( | |||
4112 | */ | 4112 | */ |
4113 | memcpy(ifp->if_u2.if_inline_ext, ifp->if_u1.if_extents, | 4113 | memcpy(ifp->if_u2.if_inline_ext, ifp->if_u1.if_extents, |
4114 | nextents * sizeof(xfs_bmbt_rec_t)); | 4114 | nextents * sizeof(xfs_bmbt_rec_t)); |
4115 | kmem_free(ifp->if_u1.if_extents, ifp->if_real_bytes); | 4115 | kmem_free(ifp->if_u1.if_extents); |
4116 | ifp->if_u1.if_extents = ifp->if_u2.if_inline_ext; | 4116 | ifp->if_u1.if_extents = ifp->if_u2.if_inline_ext; |
4117 | ifp->if_real_bytes = 0; | 4117 | ifp->if_real_bytes = 0; |
4118 | } | 4118 | } |
@@ -4186,7 +4186,7 @@ xfs_iext_indirect_to_direct( | |||
4186 | ASSERT(ifp->if_real_bytes == XFS_IEXT_BUFSZ); | 4186 | ASSERT(ifp->if_real_bytes == XFS_IEXT_BUFSZ); |
4187 | 4187 | ||
4188 | ep = ifp->if_u1.if_ext_irec->er_extbuf; | 4188 | ep = ifp->if_u1.if_ext_irec->er_extbuf; |
4189 | kmem_free(ifp->if_u1.if_ext_irec, sizeof(xfs_ext_irec_t)); | 4189 | kmem_free(ifp->if_u1.if_ext_irec); |
4190 | ifp->if_flags &= ~XFS_IFEXTIREC; | 4190 | ifp->if_flags &= ~XFS_IFEXTIREC; |
4191 | ifp->if_u1.if_extents = ep; | 4191 | ifp->if_u1.if_extents = ep; |
4192 | ifp->if_bytes = size; | 4192 | ifp->if_bytes = size; |
@@ -4212,7 +4212,7 @@ xfs_iext_destroy( | |||
4212 | } | 4212 | } |
4213 | ifp->if_flags &= ~XFS_IFEXTIREC; | 4213 | ifp->if_flags &= ~XFS_IFEXTIREC; |
4214 | } else if (ifp->if_real_bytes) { | 4214 | } else if (ifp->if_real_bytes) { |
4215 | kmem_free(ifp->if_u1.if_extents, ifp->if_real_bytes); | 4215 | kmem_free(ifp->if_u1.if_extents); |
4216 | } else if (ifp->if_bytes) { | 4216 | } else if (ifp->if_bytes) { |
4217 | memset(ifp->if_u2.if_inline_ext, 0, XFS_INLINE_EXTS * | 4217 | memset(ifp->if_u2.if_inline_ext, 0, XFS_INLINE_EXTS * |
4218 | sizeof(xfs_bmbt_rec_t)); | 4218 | sizeof(xfs_bmbt_rec_t)); |
@@ -4483,7 +4483,7 @@ xfs_iext_irec_remove( | |||
4483 | if (erp->er_extbuf) { | 4483 | if (erp->er_extbuf) { |
4484 | xfs_iext_irec_update_extoffs(ifp, erp_idx + 1, | 4484 | xfs_iext_irec_update_extoffs(ifp, erp_idx + 1, |
4485 | -erp->er_extcount); | 4485 | -erp->er_extcount); |
4486 | kmem_free(erp->er_extbuf, XFS_IEXT_BUFSZ); | 4486 | kmem_free(erp->er_extbuf); |
4487 | } | 4487 | } |
4488 | /* Compact extent records */ | 4488 | /* Compact extent records */ |
4489 | erp = ifp->if_u1.if_ext_irec; | 4489 | erp = ifp->if_u1.if_ext_irec; |
@@ -4501,8 +4501,7 @@ xfs_iext_irec_remove( | |||
4501 | xfs_iext_realloc_indirect(ifp, | 4501 | xfs_iext_realloc_indirect(ifp, |
4502 | nlists * sizeof(xfs_ext_irec_t)); | 4502 | nlists * sizeof(xfs_ext_irec_t)); |
4503 | } else { | 4503 | } else { |
4504 | kmem_free(ifp->if_u1.if_ext_irec, | 4504 | kmem_free(ifp->if_u1.if_ext_irec); |
4505 | sizeof(xfs_ext_irec_t)); | ||
4506 | } | 4505 | } |
4507 | ifp->if_real_bytes = nlists * XFS_IEXT_BUFSZ; | 4506 | ifp->if_real_bytes = nlists * XFS_IEXT_BUFSZ; |
4508 | } | 4507 | } |
@@ -4571,7 +4570,7 @@ xfs_iext_irec_compact_pages( | |||
4571 | * so er_extoffs don't get modified in | 4570 | * so er_extoffs don't get modified in |
4572 | * xfs_iext_irec_remove. | 4571 | * xfs_iext_irec_remove. |
4573 | */ | 4572 | */ |
4574 | kmem_free(erp_next->er_extbuf, XFS_IEXT_BUFSZ); | 4573 | kmem_free(erp_next->er_extbuf); |
4575 | erp_next->er_extbuf = NULL; | 4574 | erp_next->er_extbuf = NULL; |
4576 | xfs_iext_irec_remove(ifp, erp_idx + 1); | 4575 | xfs_iext_irec_remove(ifp, erp_idx + 1); |
4577 | nlists = ifp->if_real_bytes / XFS_IEXT_BUFSZ; | 4576 | nlists = ifp->if_real_bytes / XFS_IEXT_BUFSZ; |
@@ -4614,8 +4613,7 @@ xfs_iext_irec_compact_full( | |||
4614 | * so er_extoffs don't get modified in | 4613 | * so er_extoffs don't get modified in |
4615 | * xfs_iext_irec_remove. | 4614 | * xfs_iext_irec_remove. |
4616 | */ | 4615 | */ |
4617 | kmem_free(erp_next->er_extbuf, | 4616 | kmem_free(erp_next->er_extbuf); |
4618 | erp_next->er_extcount * sizeof(xfs_bmbt_rec_t)); | ||
4619 | erp_next->er_extbuf = NULL; | 4617 | erp_next->er_extbuf = NULL; |
4620 | xfs_iext_irec_remove(ifp, erp_idx + 1); | 4618 | xfs_iext_irec_remove(ifp, erp_idx + 1); |
4621 | erp = &ifp->if_u1.if_ext_irec[erp_idx]; | 4619 | erp = &ifp->if_u1.if_ext_irec[erp_idx]; |