s390/pci/dma: fix accounting of allocated_pages
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Thu, 12 Dec 2013 16:53:59 +0000 (17:53 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 16 Dec 2013 13:37:56 +0000 (14:37 +0100)
commitf7038b7c3f4924b18390c51c1ec1e49287cc87db
tree1d2db04d9d8ed0497694dc1fee5ae95b4de8d946
parent0c0c2776926018e7560b99e921467aea1115d03b
s390/pci/dma: fix accounting of allocated_pages

allocated_pages sometimes are increased even if s390_dma_alloc fails
also this value is never decreased even if s390_dma_free is called.
This patch fixes these bugs.
Also remove the atomic64_t casts (the members are already of this type).

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/pci/pci_dma.c