lkml.org 
[lkml]   [2009]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 7/7] kmemtrace: update usage of ring_buffer_lock_reserve()
    Date
    The ring buffer API has changed a bit and kmemtrace wasn't compiling
    anymore. This fixes the issue and allows kmemtrace to build.

    Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
    ---
    kernel/trace/kmemtrace.c | 12 ++++--------
    1 files changed, 4 insertions(+), 8 deletions(-)

    diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
    index 98e6f76..26ec3c3 100644
    --- a/kernel/trace/kmemtrace.c
    +++ b/kernel/trace/kmemtrace.c
    @@ -59,10 +59,8 @@ static inline void kmemtrace_alloc(enum kmemtrace_type_id type_id,
    struct ring_buffer_event *event;
    struct kmemtrace_alloc_entry *entry;
    struct trace_array *tr = kmemtrace_array;
    - unsigned long irq_flags;

    - event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry),
    - &irq_flags);
    + event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry));
    if (!event)
    return;
    entry = ring_buffer_event_data(event);
    @@ -77,7 +75,7 @@ static inline void kmemtrace_alloc(enum kmemtrace_type_id type_id,
    entry->gfp_flags = gfp_flags;
    entry->node = node;

    - ring_buffer_unlock_commit(tr->buffer, event, irq_flags);
    + ring_buffer_unlock_commit(tr->buffer, event);

    trace_wake_up();
    }
    @@ -89,10 +87,8 @@ static inline void kmemtrace_free(enum kmemtrace_type_id type_id,
    struct ring_buffer_event *event;
    struct kmemtrace_free_entry *entry;
    struct trace_array *tr = kmemtrace_array;
    - unsigned long irq_flags;

    - event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry),
    - &irq_flags);
    + event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry));
    if (!event)
    return;
    entry = ring_buffer_event_data(event);
    @@ -103,7 +99,7 @@ static inline void kmemtrace_free(enum kmemtrace_type_id type_id,
    entry->call_site = call_site;
    entry->ptr = ptr;

    - ring_buffer_unlock_commit(tr->buffer, event, irq_flags);
    + ring_buffer_unlock_commit(tr->buffer, event);

    trace_wake_up();
    }
    --
    1.6.0.6


    \
     
     \ /
      Last update: 2009-03-23 14:19    [W:0.023 / U:37.176 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site