A few simple fixes. Quiet cycle.

Cheers,
 Rusty.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJS4H+AAAoJENkgDmzRrbjxhXgP/0S4aPYPm6aw+nMKzrbZ6umd
 7kFPjZyh8zDuOOwLOIFt2gepI/H0d56ZWi4EmNBO5Md0OChNjHjDF4sC/PA+vTsQ
 DUoP6zv2yGlmbnaIri4Xo7DXOM/40G4+VOtO60KsTnwjIj8/bqA/VGBFoodqKVw4
 lBgkFs32IHynZuwxj14UeuzcPBR8tmHQDvH+ROqa5/7lzMHf24MQLh7NjNCJyoz9
 d56GW5tFNpWYgZO27v/QuAI2wHDPDpSOoZnPCh1yfr8+kk+W2HfVFYVD0dOiu2VR
 FMQ8OMGI+o9XMKvvwCxp2WkXExZRv0KbUOi8+LhphygZgLQw7FEYdulRLpPcach4
 T4vzpTHXBVhkrBNkKJIYS556xuubwnQM57ZcaoiDr16SHnyji/tALRIrhnyfvwuo
 r44HxVkq6RjMlDGZs/5JdmjcW+FWMg5/eVZBkyr+Y+/5xTo8E+WYz6JhMEc+hrrq
 TL8HDUtpEwFx1HORwkPUBNKoj14sqKwst6wVgN4iyTv534Cq8lqDPanZncBRb2ho
 p0NxTC96hqOz/LRAy5mS3qn530DOUuvEeV0KGIgbUFn4nuWeGO4kswUY7GlU8dda
 4ww3Uxw5SF9uHYBZWtXavBLIq6PhcTdJ6Ckz83kgRwev4gLo9Rj83yW/hwjP9pxu
 FwRo38ZtfY9jyL4w0cv1
 =mh3b
 -----END PGP SIGNATURE-----

Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux

Pull virtio update from Rusty Russell:
 "A few simple fixes.  Quiet cycle"

* tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  drivers: virtio: Mark function virtballoon_migratepage() as static in virtio_balloon.c
  virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
  virtio: pci: remove unnecessary pci_set_drvdata()
This commit is contained in:
Linus Torvalds 2014-01-22 22:24:35 -08:00
commit 93b05cba8e
3 changed files with 15 additions and 4 deletions

View File

@ -956,6 +956,10 @@ static void virtscsi_remove(struct virtio_device *vdev)
#ifdef CONFIG_PM_SLEEP
static int virtscsi_freeze(struct virtio_device *vdev)
{
struct Scsi_Host *sh = virtio_scsi_host(vdev);
struct virtio_scsi *vscsi = shost_priv(sh);
unregister_hotcpu_notifier(&vscsi->nb);
virtscsi_remove_vqs(vdev);
return 0;
}
@ -964,8 +968,17 @@ static int virtscsi_restore(struct virtio_device *vdev)
{
struct Scsi_Host *sh = virtio_scsi_host(vdev);
struct virtio_scsi *vscsi = shost_priv(sh);
int err;
return virtscsi_init(vdev, vscsi);
err = virtscsi_init(vdev, vscsi);
if (err)
return err;
err = register_hotcpu_notifier(&vscsi->nb);
if (err)
vdev->config->del_vqs(vdev);
return err;
}
#endif

View File

@ -369,7 +369,7 @@ static const struct address_space_operations virtio_balloon_aops;
* This function preforms the balloon page migration task.
* Called through balloon_mapping->a_ops->migratepage
*/
int virtballoon_migratepage(struct address_space *mapping,
static int virtballoon_migratepage(struct address_space *mapping,
struct page *newpage, struct page *page, enum migrate_mode mode)
{
struct balloon_dev_info *vb_dev_info = balloon_page_device(page);

View File

@ -742,7 +742,6 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
return 0;
out_set_drvdata:
pci_set_drvdata(pci_dev, NULL);
pci_iounmap(pci_dev, vp_dev->ioaddr);
out_req_regions:
pci_release_regions(pci_dev);
@ -760,7 +759,6 @@ static void virtio_pci_remove(struct pci_dev *pci_dev)
unregister_virtio_device(&vp_dev->vdev);
vp_del_vqs(&vp_dev->vdev);
pci_set_drvdata(pci_dev, NULL);
pci_iounmap(pci_dev, vp_dev->ioaddr);
pci_release_regions(pci_dev);
pci_disable_device(pci_dev);