summaryrefslogtreecommitdiffstats
path: root/block/bounce.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2015-07-24 20:37:59 +0200
committerJens Axboe <axboe@fb.com>2015-07-29 16:55:20 +0200
commitb7c44ed9d2fc6b461378c65eaf144ccc80a47772 (patch)
tree2f38bdc1cf7ea6c924f6e1d52cf5913c370e08b6 /block/bounce.c
parentblock: add a bi_error field to struct bio (diff)
downloadlinux-b7c44ed9d2fc6b461378c65eaf144ccc80a47772.tar.xz
linux-b7c44ed9d2fc6b461378c65eaf144ccc80a47772.zip
block: manipulate bio->bi_flags through helpers
Some places use helpers now, others don't. We only have the 'is set' helper, add helpers for setting and clearing flags too. It was a bit of a mess of atomic vs non-atomic access. With BIO_UPTODATE gone, we don't have any risk of concurrent access to the flags. So relax the restriction and don't make any of them atomic. The flags that do have serialization issues (reffed and chained), we already handle those separately. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/bounce.c')
-rw-r--r--block/bounce.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bounce.c b/block/bounce.c
index f4db245b9f3a..2c310ea007ee 100644
--- a/block/bounce.c
+++ b/block/bounce.c
@@ -186,7 +186,7 @@ static int must_snapshot_stable_pages(struct request_queue *q, struct bio *bio)
if (!bdi_cap_stable_pages_required(&q->backing_dev_info))
return 0;
- return test_bit(BIO_SNAP_STABLE, &bio->bi_flags);
+ return bio_flagged(bio, BIO_SNAP_STABLE);
}
#else
static int must_snapshot_stable_pages(struct request_queue *q, struct bio *bio)