lkml.org 
[lkml]   [2008]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 04/10] Introduce ridr_init()
[PATCH 04/10]

This patch introduces the ridr_init() routine.

Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net>

---
include/linux/ridr.h | 1 +
lib/ridr.c | 14 ++++++++++++++
2 files changed, 15 insertions(+)

Index: linux-2.6.25-mm1/include/linux/ridr.h
===================================================================
--- linux-2.6.25-mm1.orig/include/linux/ridr.h 2008-04-29 13:14:56.000000000 +0200
+++ linux-2.6.25-mm1/include/linux/ridr.h 2008-04-29 13:21:56.000000000 +0200
@@ -44,6 +44,7 @@ struct ridr {
* This is what we export.
*/
int ridr_pre_get(struct ridr *, gfp_t);
+void ridr_init(struct ridr *);


void __init ridr_init_cache(void);
Index: linux-2.6.25-mm1/lib/ridr.c
===================================================================
--- linux-2.6.25-mm1.orig/lib/ridr.c 2008-04-29 13:17:59.000000000 +0200
+++ linux-2.6.25-mm1/lib/ridr.c 2008-04-29 13:23:17.000000000 +0200
@@ -70,3 +70,17 @@ void __init ridr_init_cache(void)
ridr_cache_ctor);
}

+/**
+ * ridr_init - initialize ridr handle
+ * @idp: ridr handle
+ *
+ * This function is used to set up the handle (@idp) that you will pass
+ * to the rest of the functions.
+ */
+void ridr_init(struct ridr *idp)
+{
+ memset(idp, 0, sizeof(struct ridr));
+ spin_lock_init(&idp->lock);
+}
+EXPORT_SYMBOL(ridr_init);
+
--


\
 
 \ /
  Last update: 2008-04-29 16:43    [W:0.112 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site