Concurrent reads or writes to a buffer causing nested buffer space
reservations could end up in a miscalculation of the number of bytes
remaining to be read or written. Fix this by updating these counts
only once the last reservation is committed.
Signed-off-by: Philippe Gerum <email@example.com>
Signed-off-by: Jan Kiszka <firstname.lastname@example.org>