linux/drivers/s390
Dong Jia Shi 5c1cfb1c39 vfio: ccw: refactor and improve pfn_array_alloc_pin()
This refactors pfn_array_alloc_pin() and also improves it by adding
defensive code in error handling so that calling pfn_array_unpin_free()
after error return won't lead to problem. This mainly does:
1. Merge pfn_array_pin() into pfn_array_alloc_pin(), since there is no
   other user of pfn_array_pin(). As a result, also remove kernel-doc
   for pfn_array_pin() and add/update kernel-doc for pfn_array_alloc_pin()
   and struct pfn_array.
2. For a vfio_pin_pages() failure, set pa->pa_nr to zero to indicate
   zero pages were pinned.
3. Set pa->pa_iova_pfn to NULL right after it was freed.

Suggested-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Dong Jia Shi <bjsdjshi@linux.ibm.com>
Message-Id: <20180523025645.8978-3-bjsdjshi@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-05-29 09:27:42 +02:00
..
block s390/dasd: simplify locking in dasd_times_out 2018-05-25 08:12:50 +02:00
char s390: introduce compile time check for empty .bss section 2018-05-09 10:55:01 +02:00
cio vfio: ccw: refactor and improve pfn_array_alloc_pin() 2018-05-29 09:27:42 +02:00
crypto s390/zcrypt: Support up to 256 crypto adapters. 2018-04-11 10:36:27 +02:00
net s390/qeth: use Read device to query hypervisor for MAC 2018-04-22 14:42:32 -04:00
scsi bsg-lib: introduce a timeout field in struct bsg_job 2018-03-13 11:40:21 -06:00
virtio virtio/s390: implement PM operations for virtio_ccw 2018-02-14 14:34:09 +02:00
Makefile kbuild: rename built-in.o to built-in.a 2018-03-26 02:01:19 +09:00