include/asm-x86/voyager.h: checkpatch cleanups - formatting only
[sfrench/cifs-2.6.git] / mm / page_io.c
index dbffec0d78c98407737ac544cb2ea5ad17a9c7c2..065c4480eaf0905c8631732540a118c002989f09 100644 (file)
@@ -44,14 +44,11 @@ static struct bio *get_swap_bio(gfp_t gfp_flags, pgoff_t index,
        return bio;
 }
 
-static int end_swap_bio_write(struct bio *bio, unsigned int bytes_done, int err)
+static void end_swap_bio_write(struct bio *bio, int err)
 {
        const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
        struct page *page = bio->bi_io_vec[0].bv_page;
 
-       if (bio->bi_size)
-               return 1;
-
        if (!uptodate) {
                SetPageError(page);
                /*
@@ -71,17 +68,13 @@ static int end_swap_bio_write(struct bio *bio, unsigned int bytes_done, int err)
        }
        end_page_writeback(page);
        bio_put(bio);
-       return 0;
 }
 
-int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err)
+void end_swap_bio_read(struct bio *bio, int err)
 {
        const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
        struct page *page = bio->bi_io_vec[0].bv_page;
 
-       if (bio->bi_size)
-               return 1;
-
        if (!uptodate) {
                SetPageError(page);
                ClearPageUptodate(page);
@@ -94,7 +87,6 @@ int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err)
        }
        unlock_page(page);
        bio_put(bio);
-       return 0;
 }
 
 /*
@@ -134,7 +126,7 @@ int swap_readpage(struct file *file, struct page *page)
        int ret = 0;
 
        BUG_ON(!PageLocked(page));
-       ClearPageUptodate(page);
+       BUG_ON(PageUptodate(page));
        bio = get_swap_bio(GFP_KERNEL, page_private(page), page,
                                end_swap_bio_read);
        if (bio == NULL) {