Skip to contentSkip to conversation

cluster/group/gfs_controld plock.c

Cluster-devel [email protected] 1 participant 1 message Oct 9, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-10-09 21:51:49

Modified files:
group/gfs_controld: plock.c

Log message:
if we get a plock request from the kernel when plocks are disabled, return -ENOSYS for the request

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

group/gfs_controld/plock.c +5 -0
@@ -311,6 +311,11 @@
 
 	rv = read(control_fd, &info, sizeof(info));
 
+	if (!plocks_online) {
+		rv = -ENOSYS;
+		goto fail;
+	}
+
 	mg = find_mg_id(info.fsid);
 	if (!mg) {
 		log_debug("process_plocks: no mg id %x", info.fsid);