diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-02-16 10:25:40 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-02-18 10:32:00 +0100 |
commit | 93dbb393503d53cd226e5e1f0088fe8f4dbaa2b8 (patch) | |
tree | 790365e207951cf6810e8995f3141ddc0b74519b /kernel | |
parent | c1c201200a359cf3b6e2e36a4236cdca77a3cd8e (diff) | |
download | op-kernel-dev-93dbb393503d53cd226e5e1f0088fe8f4dbaa2b8.zip op-kernel-dev-93dbb393503d53cd226e5e1f0088fe8f4dbaa2b8.tar.gz |
block: fix bad definition of BIO_RW_SYNC
We can't OR shift values, so get rid of BIO_RW_SYNC and use BIO_RW_SYNCIO
and BIO_RW_UNPLUG explicitly. This brings back the behaviour from before
213d9417fec62ef4c3675621b9364a667954d4dd.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/swap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 6da1435..505f319 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -60,6 +60,7 @@ static struct block_device *resume_bdev; static int submit(int rw, pgoff_t page_off, struct page *page, struct bio **bio_chain) { + const int bio_rw = rw | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG); struct bio *bio; bio = bio_alloc(__GFP_WAIT | __GFP_HIGH, 1); @@ -80,7 +81,7 @@ static int submit(int rw, pgoff_t page_off, struct page *page, bio_get(bio); if (bio_chain == NULL) { - submit_bio(rw | (1 << BIO_RW_SYNC), bio); + submit_bio(bio_rw, bio); wait_on_page_locked(page); if (rw == READ) bio_set_pages_dirty(bio); @@ -90,7 +91,7 @@ static int submit(int rw, pgoff_t page_off, struct page *page, get_page(page); /* These pages are freed later */ bio->bi_private = *bio_chain; *bio_chain = bio; - submit_bio(rw | (1 << BIO_RW_SYNC), bio); + submit_bio(bio_rw, bio); } return 0; } |