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.
This commit is contained in:
Markus Armbruster 2013-01-08 17:38:42 +01:00
parent c4c4413ea5
commit bfea79a72d
2 changed files with 4 additions and 2 deletions

View file

@ -68,7 +68,8 @@ setres(void)
amt = 100;
if (amt < 0)
amt = 0;
check_sect_ok(&sect);
if (!check_sect_ok(&sect))
return RET_FAIL;
switch (char0) {
case 'i':
if (sect.sct_own != 0)

View file

@ -67,7 +67,8 @@ setsector(void)
if (!p || !*p)
return RET_SYN;
amt = atoi(p);
check_sect_ok(&sect);
if (!check_sect_ok(&sect))
return RET_FAIL;
switch (char0) {
case 'i':
current = sect.sct_min;