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/linux-2.6 | |
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/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/kmem.c | 4 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/kmem.h | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 9 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 8 |
4 files changed, 11 insertions, 12 deletions
diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c index 9b1bb17a0501..69233a52f0a6 100644 --- a/fs/xfs/linux-2.6/kmem.c +++ b/fs/xfs/linux-2.6/kmem.c | |||
@@ -90,7 +90,7 @@ kmem_zalloc_greedy(size_t *size, size_t minsize, size_t maxsize, | |||
90 | } | 90 | } |
91 | 91 | ||
92 | void | 92 | void |
93 | kmem_free(void *ptr, size_t size) | 93 | kmem_free(void *ptr) |
94 | { | 94 | { |
95 | if (!is_vmalloc_addr(ptr)) { | 95 | if (!is_vmalloc_addr(ptr)) { |
96 | kfree(ptr); | 96 | kfree(ptr); |
@@ -110,7 +110,7 @@ kmem_realloc(void *ptr, size_t newsize, size_t oldsize, | |||
110 | if (new) | 110 | if (new) |
111 | memcpy(new, ptr, | 111 | memcpy(new, ptr, |
112 | ((oldsize < newsize) ? oldsize : newsize)); | 112 | ((oldsize < newsize) ? oldsize : newsize)); |
113 | kmem_free(ptr, oldsize); | 113 | kmem_free(ptr); |
114 | } | 114 | } |
115 | return new; | 115 | return new; |
116 | } | 116 | } |
diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h index a20683cf74dd..a3c96207e60e 100644 --- a/fs/xfs/linux-2.6/kmem.h +++ b/fs/xfs/linux-2.6/kmem.h | |||
@@ -58,7 +58,7 @@ extern void *kmem_alloc(size_t, unsigned int __nocast); | |||
58 | extern void *kmem_zalloc(size_t, unsigned int __nocast); | 58 | extern void *kmem_zalloc(size_t, unsigned int __nocast); |
59 | extern void *kmem_zalloc_greedy(size_t *, size_t, size_t, unsigned int __nocast); | 59 | extern void *kmem_zalloc_greedy(size_t *, size_t, size_t, unsigned int __nocast); |
60 | extern void *kmem_realloc(void *, size_t, size_t, unsigned int __nocast); | 60 | extern void *kmem_realloc(void *, size_t, size_t, unsigned int __nocast); |
61 | extern void kmem_free(void *, size_t); | 61 | extern void kmem_free(void *); |
62 | 62 | ||
63 | /* | 63 | /* |
64 | * Zone interfaces | 64 | * Zone interfaces |
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 98e0e86093b4..ed03c6d3c9c1 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -310,8 +310,7 @@ _xfs_buf_free_pages( | |||
310 | xfs_buf_t *bp) | 310 | xfs_buf_t *bp) |
311 | { | 311 | { |
312 | if (bp->b_pages != bp->b_page_array) { | 312 | if (bp->b_pages != bp->b_page_array) { |
313 | kmem_free(bp->b_pages, | 313 | kmem_free(bp->b_pages); |
314 | bp->b_page_count * sizeof(struct page *)); | ||
315 | } | 314 | } |
316 | } | 315 | } |
317 | 316 | ||
@@ -1398,7 +1397,7 @@ STATIC void | |||
1398 | xfs_free_bufhash( | 1397 | xfs_free_bufhash( |
1399 | xfs_buftarg_t *btp) | 1398 | xfs_buftarg_t *btp) |
1400 | { | 1399 | { |
1401 | kmem_free(btp->bt_hash, (1<<btp->bt_hashshift) * sizeof(xfs_bufhash_t)); | 1400 | kmem_free(btp->bt_hash); |
1402 | btp->bt_hash = NULL; | 1401 | btp->bt_hash = NULL; |
1403 | } | 1402 | } |
1404 | 1403 | ||
@@ -1444,7 +1443,7 @@ xfs_free_buftarg( | |||
1444 | xfs_unregister_buftarg(btp); | 1443 | xfs_unregister_buftarg(btp); |
1445 | kthread_stop(btp->bt_task); | 1444 | kthread_stop(btp->bt_task); |
1446 | 1445 | ||
1447 | kmem_free(btp, sizeof(*btp)); | 1446 | kmem_free(btp); |
1448 | } | 1447 | } |
1449 | 1448 | ||
1450 | STATIC int | 1449 | STATIC int |
@@ -1575,7 +1574,7 @@ xfs_alloc_buftarg( | |||
1575 | return btp; | 1574 | return btp; |
1576 | 1575 | ||
1577 | error: | 1576 | error: |
1578 | kmem_free(btp, sizeof(*btp)); | 1577 | kmem_free(btp); |
1579 | return NULL; | 1578 | return NULL; |
1580 | } | 1579 | } |
1581 | 1580 | ||
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 1b60e46f527f..5c7144bc3106 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -1074,7 +1074,7 @@ xfssyncd( | |||
1074 | list_del(&work->w_list); | 1074 | list_del(&work->w_list); |
1075 | if (work == &mp->m_sync_work) | 1075 | if (work == &mp->m_sync_work) |
1076 | continue; | 1076 | continue; |
1077 | kmem_free(work, sizeof(struct bhv_vfs_sync_work)); | 1077 | kmem_free(work); |
1078 | } | 1078 | } |
1079 | } | 1079 | } |
1080 | 1080 | ||
@@ -1222,7 +1222,7 @@ xfs_fs_remount( | |||
1222 | error = xfs_parseargs(mp, options, args, 1); | 1222 | error = xfs_parseargs(mp, options, args, 1); |
1223 | if (!error) | 1223 | if (!error) |
1224 | error = xfs_mntupdate(mp, flags, args); | 1224 | error = xfs_mntupdate(mp, flags, args); |
1225 | kmem_free(args, sizeof(*args)); | 1225 | kmem_free(args); |
1226 | return -error; | 1226 | return -error; |
1227 | } | 1227 | } |
1228 | 1228 | ||
@@ -1369,7 +1369,7 @@ xfs_fs_fill_super( | |||
1369 | 1369 | ||
1370 | xfs_itrace_exit(XFS_I(sb->s_root->d_inode)); | 1370 | xfs_itrace_exit(XFS_I(sb->s_root->d_inode)); |
1371 | 1371 | ||
1372 | kmem_free(args, sizeof(*args)); | 1372 | kmem_free(args); |
1373 | return 0; | 1373 | return 0; |
1374 | 1374 | ||
1375 | fail_vnrele: | 1375 | fail_vnrele: |
@@ -1384,7 +1384,7 @@ fail_unmount: | |||
1384 | xfs_unmount(mp, 0, NULL); | 1384 | xfs_unmount(mp, 0, NULL); |
1385 | 1385 | ||
1386 | fail_vfsop: | 1386 | fail_vfsop: |
1387 | kmem_free(args, sizeof(*args)); | 1387 | kmem_free(args); |
1388 | return -error; | 1388 | return -error; |
1389 | } | 1389 | } |
1390 | 1390 | ||