[Cluster-devel] cluster/gfs-kernel/src/dlm plock.c

adas at sourceware.org adas at sourceware.org
Thu Sep 14 16:00:19 UTC 2006


CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	STABLE
Changes by:	adas at sourceware.org	2006-09-14 16:00:18

Modified files:
	gfs-kernel/src/dlm: plock.c 

Log message:
	fix for bz 206339. Was passing fl_pid instead of fl_owner causing F_GETLK to return conflicts with a process' own locks

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/dlm/plock.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.12.8.1&r2=1.12.8.2

--- cluster/gfs-kernel/src/dlm/Attic/plock.c	2006/07/12 21:58:29	1.12.8.1
+++ cluster/gfs-kernel/src/dlm/Attic/plock.c	2006/09/14 16:00:18	1.12.8.2
@@ -753,7 +753,7 @@
    shrink, shift, split, etc existing locks (this often involves adding new
    locks in addition to modifying existing locks. */
 
-static int plock_internal(struct dlm_resource *r, unsigned long owner,
+static int plock_internal(struct dlm_resource *r, unsigned long owner, 
 			  unsigned int pid, int wait, int ex, uint64_t start, 
 			  uint64_t end)
 {
@@ -1179,7 +1179,7 @@
 			put_resource(r);
 			goto out;
 		}
-
+		
 		found = get_local_conflict(dlm, r, name, owner, start, end, ex,
 					   rowner, rpid);
 		up(&r->sema);
@@ -1187,7 +1187,7 @@
 		if (found) {
 			error = 1;
 			goto out;
-	}
+		}
 	}
 
 	error = get_global_conflict(dlm, name, owner, start, end, ex, rowner, rpid);
@@ -1236,7 +1236,7 @@
 
 	ex = (fl->fl_type == F_WRLCK) ? 1 : 0;
 
-	error = do_plock_get(dlm, name, fl->fl_pid, &fl->fl_start,
+	error = do_plock_get(dlm, name, fl->fl_owner, &fl->fl_start,
 			     &fl->fl_end, &ex, &owner, &pid);
 	if (error < 0)
 		return error;




More information about the Cluster-devel mailing list