lkml.org 
[lkml]   [2008]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/4] integrity: Linux Integrity Module(LIM)
From
Date
On Thu, 2008-11-20 at 11:43 -0500, Mimi Zohar wrote:
>
> +static inline void tget(struct template_list_entry *entry)
> +{
> + atomic_inc(&entry->refcount);
> +}
> +
> +static inline void tput(struct template_list_entry *entry)
> +{
> + if (atomic_dec_and_test(&entry->refcount))
> + kfree(entry);
> +}

Seems like a good place for a kref.

-- Dave



\
 
 \ /
  Last update: 2008-11-21 18:51    [W:0.097 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site