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().
This commit is contained in:
parent
f4db90c849
commit
04a332a89d
2 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue