svn commit: r226019 - projects/geom-events/sys/geom

Lev A. Serebryakov lev at FreeBSD.org
Tue Oct 4 17:50:22 UTC 2011


Author: lev (ports committer)
Date: Tue Oct  4 17:50:22 2011
New Revision: 226019
URL: http://svn.freebsd.org/changeset/base/226019

Log:
  Use proper memory allocation flags for GEOM fast path

Modified:
  projects/geom-events/sys/geom/geom_notify.c

Modified: projects/geom-events/sys/geom/geom_notify.c
==============================================================================
--- projects/geom-events/sys/geom/geom_notify.c	Tue Oct  4 17:49:19 2011	(r226018)
+++ projects/geom-events/sys/geom/geom_notify.c	Tue Oct  4 17:50:22 2011	(r226019)
@@ -54,7 +54,7 @@ g_devctl_notify(struct g_provider *pp, c
 	int len;
 	int i;
 
-	subsystem = g_malloc(strlen(pp->geom->class->name) + 1, M_WAITOK);
+	subsystem = g_malloc(strlen(pp->geom->class->name) + 1, M_NOWAIT);
 	if (subsystem == NULL)
 		return;
 	for (i = 0; pp->geom->class->name[i]; i++)
@@ -62,7 +62,7 @@ g_devctl_notify(struct g_provider *pp, c
 	subsystem[i] = 0;
 
 	if (format != NULL) {
-		additional_data = g_malloc(1024, M_WAITOK);
+		additional_data = g_malloc(1024, M_NOWAIT);
 		if (additional_data == NULL) {
 			g_free(subsystem);
 			return;
@@ -78,7 +78,7 @@ g_devctl_notify(struct g_provider *pp, c
 	/* Add more space for mandatory arguments, space and zero */
 	len += sizeof("geom=") + strlen(pp->geom->name) +
 	       sizeof("provider=") + strlen(pp->name) + 2;
-	full_data = g_malloc(len, M_WAITOK);
+	full_data = g_malloc(len, M_NOWAIT);
 	if (full_data == NULL) {
 		g_free(subsystem);
 		if (additional_data != NULL)


More information about the svn-src-projects mailing list