* [PATCH] Remove unused variable in ktrace_free()
@ 2008-12-04 6:19 Lachlan McIlroy
2008-12-04 7:09 ` Christoph Hellwig
2008-12-04 15:29 ` Eric Sandeen
0 siblings, 2 replies; 3+ messages in thread
From: Lachlan McIlroy @ 2008-12-04 6:19 UTC (permalink / raw)
To: xfs-oss
entries_size is probably left over from when we used to pass the
size to kmem_free().
--- xfs-fix.orig/fs/xfs/support/ktrace.c
+++ xfs-fix/fs/xfs/support/ktrace.c
@@ -113,21 +113,16 @@ ktrace_alloc(int nentries, unsigned int
void
ktrace_free(ktrace_t *ktp)
{
- int entries_size;
-
if (ktp == (ktrace_t *)NULL)
return;
/*
* Special treatment for the Vnode trace buffer.
*/
- if (ktp->kt_nentries == ktrace_zentries) {
+ if (ktp->kt_nentries == ktrace_zentries)
kmem_zone_free(ktrace_ent_zone, ktp->kt_entries);
- } else {
- entries_size = (int)(ktp->kt_nentries * sizeof(ktrace_entry_t));
-
+ else
kmem_free(ktp->kt_entries);
- }
kmem_zone_free(ktrace_hdr_zone, ktp);
}
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove unused variable in ktrace_free()
2008-12-04 6:19 [PATCH] Remove unused variable in ktrace_free() Lachlan McIlroy
@ 2008-12-04 7:09 ` Christoph Hellwig
2008-12-04 15:29 ` Eric Sandeen
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2008-12-04 7:09 UTC (permalink / raw)
To: Lachlan McIlroy; +Cc: xfs-oss
On Thu, Dec 04, 2008 at 05:19:09PM +1100, Lachlan McIlroy wrote:
> entries_size is probably left over from when we used to pass the
> size to kmem_free().
Looks good.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove unused variable in ktrace_free()
2008-12-04 6:19 [PATCH] Remove unused variable in ktrace_free() Lachlan McIlroy
2008-12-04 7:09 ` Christoph Hellwig
@ 2008-12-04 15:29 ` Eric Sandeen
1 sibling, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2008-12-04 15:29 UTC (permalink / raw)
To: lachlan; +Cc: xfs-oss
Lachlan McIlroy wrote:
> entries_size is probably left over from when we used to pass the
> size to kmem_free().
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
> --- xfs-fix.orig/fs/xfs/support/ktrace.c
> +++ xfs-fix/fs/xfs/support/ktrace.c
> @@ -113,21 +113,16 @@ ktrace_alloc(int nentries, unsigned int
> void
> ktrace_free(ktrace_t *ktp)
> {
> - int entries_size;
> -
> if (ktp == (ktrace_t *)NULL)
> return;
>
> /*
> * Special treatment for the Vnode trace buffer.
> */
> - if (ktp->kt_nentries == ktrace_zentries) {
> + if (ktp->kt_nentries == ktrace_zentries)
> kmem_zone_free(ktrace_ent_zone, ktp->kt_entries);
> - } else {
> - entries_size = (int)(ktp->kt_nentries * sizeof(ktrace_entry_t));
> -
> + else
> kmem_free(ktp->kt_entries);
> - }
>
> kmem_zone_free(ktrace_hdr_zone, ktp);
> }
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-04 15:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-04 6:19 [PATCH] Remove unused variable in ktrace_free() Lachlan McIlroy
2008-12-04 7:09 ` Christoph Hellwig
2008-12-04 15:29 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox