From b58c37e2966eb3d6e4ea4d3d8c9f59c04eef182c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 11 Apr 2011 21:52:10 +0200 Subject: [PATCH] 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. --- src/lib/commands/give.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/commands/give.c b/src/lib/commands/give.c index 82b37ec2..656b0896 100644 --- a/src/lib/commands/give.c +++ b/src/lib/commands/give.c @@ -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;