[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/group/gfs_controld main.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2006-11-27 22:42:36

Modified files:
	group/gfs_controld: main.c 

Log message:
	if mount fails, don't try to save the mg info for the new group
	since there won't be any mg and we'll segfault

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.22&r2=1.23

--- cluster/group/gfs_controld/main.c	2006/11/21 17:28:09	1.22
+++ cluster/group/gfs_controld/main.c	2006/11/27 22:42:36	1.23
@@ -293,12 +293,13 @@
 		/* ci, dir, type, proto, table, extra */
 		rv = do_mount(ci, argv[1], argv[2], argv[3], argv[4], argv[5],
 			      &mg);
-		client[ci].mg = mg;
-		fd = client[ci].fd;
-		fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
-		mg->mount_client_fd = fd;
-		goto reply;
-
+		if (!rv) {
+			client[ci].mg = mg;
+			fd = client[ci].fd;
+			fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
+			mg->mount_client_fd = fd;
+			goto reply;
+		}
 	} else if (!strcmp(cmd, "mount_result")) {
 		got_mount_result(client[ci].mg, atoi(argv[3]));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]