From bfea79a72d53566745a2310c96c34de1d6ebf45f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 8 Jan 2013 17:38:42 +0100 Subject: [PATCH] Really fix setsector and setres not to wipe out concurrent updates setsector() and setres() continue after check_sect_ok() fails. Clobbers the updates that made check_sect_ok() fail, triggering a seqno mismatch oops. Commit 04a332a8 (v4.3.27) claimed to fix this, but actually only suppressed the generation oops. --- src/lib/commands/setres.c | 3 ++- src/lib/commands/setsect.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/commands/setres.c b/src/lib/commands/setres.c index 3d411abf..e1b247ea 100644 --- a/src/lib/commands/setres.c +++ b/src/lib/commands/setres.c @@ -68,7 +68,8 @@ setres(void) amt = 100; if (amt < 0) amt = 0; - check_sect_ok(§); + if (!check_sect_ok(§)) + return RET_FAIL; switch (char0) { case 'i': if (sect.sct_own != 0) diff --git a/src/lib/commands/setsect.c b/src/lib/commands/setsect.c index d9359d60..ab635580 100644 --- a/src/lib/commands/setsect.c +++ b/src/lib/commands/setsect.c @@ -67,7 +67,8 @@ setsector(void) if (!p || !*p) return RET_SYN; amt = atoi(p); - check_sect_ok(§); + if (!check_sect_ok(§)) + return RET_FAIL; switch (char0) { case 'i': current = sect.sct_min;