cgfs: fix dorealloc's batch allocation
cgfs: fix dorealloc's batch allocation

The initial check should use real lengths as with modulo a
new required length of eg. 52 would be considered smaller
than an old length of 48 (2 < 48).

To get the 'batches' count 'newlen' must be divided and not
taken modulo BATCH_SIZE. Otherwise '101', which would need a
3rd batch to reach 150, would end up with two (2*50 = 100
bytes) and thereby be truncated instead.

Signed-off-by: Wolfgang Bumiller <bac7898f539fd233d9ce33be7a9eda13ee647930@proxmox.com>
Signed-off-by: Serge Hallyn <3df611b026e4639bee8aef7a4beb2e39fcebb313@ubuntu.com>

evgeni/pkg-lxcfs-debian,evgeni/pkg-lxcfs-debian,Xeno22/lxcfs,Xeno22/lxcfs