From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2093 invoked by alias); 3 Oct 2011 18:29:51 -0000 Received: (qmail 2075 invoked by uid 9737); 3 Oct 2011 18:29:49 -0000 Date: Mon, 03 Oct 2011 18:29:00 -0000 Message-ID: <20111003182949.2073.qmail@sourceware.org> From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/libdm libdm-deptree.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-10/txt/msg00003.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-10-03 18:29:49 Modified files: libdm : libdm-deptree.c Log message: Move priority check in front Just a minor code mode - make a test for priority before more complex uuid checks. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-deptree.c.diff?cvsroot=lvm2&r1=1.117&r2=1.118 --- LVM2/libdm/libdm-deptree.c 2011/10/03 18:28:25 1.117 +++ LVM2/libdm/libdm-deptree.c 2011/10/03 18:29:48 1.118 @@ -1419,6 +1419,9 @@ for (priority = 0; priority < 3; priority++) { while ((child = dm_tree_next_child(&handle, dnode, 0))) { + if (priority != child->activation_priority) + continue; + if (!(uuid = dm_tree_node_get_uuid(child))) { stack; continue; @@ -1427,9 +1430,6 @@ if (!_uuid_prefix_matches(uuid, uuid_prefix, uuid_prefix_len)) continue; - if (priority != child->activation_priority) - continue; - if (!(name = dm_tree_node_get_name(child))) { stack; continue;