xfs
[Top] [All Lists]

[PATCH] Remove unused variable in ktrace_free()

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [PATCH] Remove unused variable in ktrace_free()
From: Lachlan McIlroy <lachlan@xxxxxxx>
Date: Thu, 04 Dec 2008 17:19:09 +1100
Reply-to: lachlan@xxxxxxx
User-agent: Thunderbird 2.0.0.18 (X11/20081105)
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);
 }

<Prev in Thread] Current Thread [Next in Thread>