lkml.org 
[lkml]   [2008]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH -v4 05/14] fsnotify: unified filesystem notification backend
Hi.

On Fri, Dec 12, 2008 at 04:51:40PM -0500, Eric Paris (eparis@redhat.com) wrote:
> +DEFINE_MUTEX(fsnotify_grp_mutex);
> +struct srcu_struct fsnotify_grp_srcu_struct;
> +LIST_HEAD(fsnotify_groups);
> +__u64 fsnotify_mask;

Those can be static.

> +struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u64 mask, void *data, int data_is)
> +{
> + struct fsnotify_event *event;
> +
> + event = kmem_cache_alloc(event_kmem_cache, GFP_KERNEL);
> + if (!event)
> + return NULL;
> +
> + atomic_set(&event->refcnt, 1);
> +
> + spin_lock_init(&event->lock);
> +
> + event->path.dentry = NULL;
> + event->path.mnt = NULL;
> + event->inode = NULL;
> +
> + INIT_LIST_HEAD(&event->private_data_list);
> +
> + event->to_tell = to_tell;

What prevents this inode to be released?

--
Evgeniy Polyakov


\
 
 \ /
  Last update: 2008-12-13 03:57    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog