From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2158 invoked by alias); 1 Feb 2011 17:31:41 -0000 Received: (qmail 2140 invoked by uid 9478); 1 Feb 2011 17:31:40 -0000 Date: Tue, 01 Feb 2011 17:31:00 -0000 Message-ID: <20110201173140.2138.qmail@sourceware.org> From: jbrassow@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/locking cluster_locking.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00000.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-02-01 17:31:40 Modified files: lib/locking : cluster_locking.c Log message: fix bad 'strcmp's in 'decode_lock_type' - missing !'s There was no effect from having this wrong yet, because the tree of callers only ever cared about the answer to the first condition (!response), which determines whether a lock is held or not. Correct responses, however, are needed soon. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/cluster_locking.c.diff?cvsroot=lvm2&r1=1.50&r2=1.51 --- LVM2/lib/locking/cluster_locking.c 2011/01/28 10:16:04 1.50 +++ LVM2/lib/locking/cluster_locking.c 2011/02/01 17:31:40 1.51 @@ -490,11 +490,11 @@ { if (!response) return LCK_NULL; - else if (strcmp(response, "EX")) + else if (!strcmp(response, "EX")) return LCK_EXCL; - else if (strcmp(response, "CR")) + else if (!strcmp(response, "CR")) return LCK_READ; - else if (strcmp(response, "PR")) + else if (!strcmp(response, "PR")) return LCK_PREAD; stack; @@ -532,8 +532,8 @@ /* * All nodes should use CR, or exactly one node - * should held EX. (PR is obsolete) - * If two nodes node reports different locks, + * should hold EX. (PR is obsolete) + * If two nodes report different locks, * something is broken - just return more important mode. */ if (decode_lock_type(response[i].response) > *mode)