Fix give not to wipe out concurrect updates
give() reads the sector, prompts for input, updates the sector and writes it back, triggering a generation oops. Any updates made by other threads during the yield are wiped out, triggering a seqno mismatch oops.
This commit is contained in:
parent
e3cf1e3280
commit
b58c37e296
1 changed files with 1 additions and 0 deletions
|
@ -62,6 +62,7 @@ give(void)
|
|||
return RET_SYN;
|
||||
if ((amt = atoi(p)) == 0)
|
||||
return RET_SYN;
|
||||
check_sect_ok(§);
|
||||
n = sect.sct_item[ip->i_uid];
|
||||
if (amt < 0 && -amt > n) {
|
||||
m = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue