Merge branch 'for-4.16/block' of git://git.kernel.dk/linux-block
[sfrench/cifs-2.6.git] / kernel / power / swap.c
index 293ead59ecccbab5c3013be15d5f4cbfbef2315f..11b4282c2d2031d8208d53917f78d3aec5323bf0 100644 (file)
@@ -240,7 +240,7 @@ static void hib_init_batch(struct hib_bio_batch *hb)
 static void hib_end_io(struct bio *bio)
 {
        struct hib_bio_batch *hb = bio->bi_private;
-       struct page *page = bio->bi_io_vec[0].bv_page;
+       struct page *page = bio_first_page_all(bio);
 
        if (bio->bi_status) {
                pr_alert("Read-error on swap-device (%u:%u:%Lu)\n",
@@ -879,7 +879,7 @@ out_clean:
  *     space avaiable from the resume partition.
  */
 
-static int enough_swap(unsigned int nr_pages, unsigned int flags)
+static int enough_swap(unsigned int nr_pages)
 {
        unsigned int free_swap = count_swap_pages(root_swap, 1);
        unsigned int required;
@@ -915,7 +915,7 @@ int swsusp_write(unsigned int flags)
                return error;
        }
        if (flags & SF_NOCOMPRESS_MODE) {
-               if (!enough_swap(pages, flags)) {
+               if (!enough_swap(pages)) {
                        pr_err("Not enough free swap\n");
                        error = -ENOSPC;
                        goto out_finish;