mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Try to fix possible infinite loop in dependency tree walking (by mornfall).
This commit is contained in:
parent
550463b5e1
commit
affecdc5fc
@ -75,8 +75,8 @@ struct pv_segment;
|
||||
#define PARTIAL_LV 0x01000000U /* LV - derived flag, not
|
||||
written out in metadata*/
|
||||
|
||||
//#define POSTORDER_FLAG 0x02000000U /* Not a real flag, reserved for
|
||||
// temporary use inside vg_read. */
|
||||
//#define POSTORDER_FLAG 0x02000000U /* Not real flags, reserved for
|
||||
//#define POSTORDER_OPEN_FLAG 0x04000000U temporary use inside vg_read. */
|
||||
|
||||
#define LVM_READ 0x00000100U /* LV VG */
|
||||
#define LVM_WRITE 0x00000200U /* LV VG */
|
||||
|
@ -1199,7 +1199,11 @@ static int _lv_postorder_visit(struct logical_volume *,
|
||||
static int _lv_postorder_level(struct logical_volume *lv, void *data)
|
||||
{
|
||||
struct _lv_postorder_baton *baton = data;
|
||||
if (lv->status & POSTORDER_OPEN_FLAG)
|
||||
return 1; // a data structure loop has closed...
|
||||
lv->status |= POSTORDER_OPEN_FLAG;
|
||||
int r =_lv_postorder_visit(lv, baton->fn, baton->data);
|
||||
lv->status &= ~POSTORDER_OPEN_FLAG;
|
||||
lv->status |= POSTORDER_FLAG;
|
||||
return r;
|
||||
};
|
||||
|
@ -67,8 +67,8 @@
|
||||
//#define PARTIAL_LV 0x01000000U /* LV - derived flag, not
|
||||
// written out in metadata*/
|
||||
|
||||
#define POSTORDER_FLAG 0x02000000U /* Not a real flag, reserved for
|
||||
temporary use inside vg_read. */
|
||||
#define POSTORDER_FLAG 0x02000000U /* Not real flags, reserved for */
|
||||
#define POSTORDER_OPEN_FLAG 0x04000000U /* temporary use inside vg_read. */
|
||||
|
||||
//#define LVM_READ 0x00000100U /* LV VG */
|
||||
//#define LVM_WRITE 0x00000200U /* LV VG */
|
||||
|
Loading…
Reference in New Issue
Block a user