Skip to contentSkip to conversation

cluster/gfs-kernel/src/gfs main.c

Cluster-devel [email protected] 1 participant 1 message Jan 28, 2008

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: fabbione at sourceware.org 2008-01-28 06:21:21

Modified files:
gfs-kernel/src/gfs: main.c

Log message:
EXPORT_SYMBOL(xtime) has been removed in 2.6.24.

Let's use the exact same value (tv_nsec) just from another source.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/main.c.diff?cvsroot=cluster&r1=1.11&r2=1.12

gfs-kernel/src/gfs/main.c +4 -1
@@ -21,6 +21,7 @@
 #include <linux/proc_fs.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/time.h>
 
 #include "gfs.h"
 #include "ops_fstype.h"
@@ -36,6 +37,7 @@
 int __init init_gfs_fs(void)
 {
 	int error;
+	struct timespec tv;
 
 /*	gfs2_init_lmh(); gfs2 should do this for us*/
 
@@ -46,7 +48,8 @@
 	if (error)
 		goto fail;
 
-	gfs_random_number = xtime.tv_nsec;
+	getnstimeofday(&tv);
+	gfs_random_number = tv.tv_nsec;
 
 	gfs_glock_cachep = kmem_cache_create("gfs_glock", sizeof(struct gfs_glock),
 					     0, 0,