From 04a332a89d4e52d8d78be25fb16085dfd10d3e82 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 16 Apr 2011 20:34:26 +0200 Subject: [PATCH] Fix setsector and setres not to wipe out concurrent updates setsector() reads the sector, prompts for input, then writes back the sector, triggering a generation oops. Any updates made by other threads while setsector() waits for input are wiped out, triggering a seqno mismatch oops. Same for setres(). --- src/lib/commands/setres.c | 1 + src/lib/commands/setsect.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/lib/commands/setres.c b/src/lib/commands/setres.c index df5129f8..80b9bbbc 100644 --- a/src/lib/commands/setres.c +++ b/src/lib/commands/setres.c @@ -68,6 +68,7 @@ setres(void) amt = 100; if (amt < 0) amt = 0; + check_sect_ok(§); switch (char0) { case 'i': if (sect.sct_own != 0) diff --git a/src/lib/commands/setsect.c b/src/lib/commands/setsect.c index f157abc9..05397967 100644 --- a/src/lib/commands/setsect.c +++ b/src/lib/commands/setsect.c @@ -68,6 +68,7 @@ setsector(void) if (!p || !*p) return RET_SYN; amt = atoi(p); + check_sect_ok(§); switch (char0) { case 'i': current = sect.sct_min;