block: Abstract out bvec iterator
[deliverable/linux.git] / drivers / md / bcache / writeback.h
index fe7d9d56492b339a1d31c3b91e0c7c3d07034c9a..e2f8598937ac41ff5c7577bc5e65aeb39de95386 100644 (file)
@@ -45,12 +45,12 @@ static inline bool should_writeback(struct cached_dev *dc, struct bio *bio,
        unsigned in_use = dc->disk.c->gc_stats.in_use;
 
        if (cache_mode != CACHE_MODE_WRITEBACK ||
-           atomic_read(&dc->disk.detaching) ||
+           test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) ||
            in_use > CUTOFF_WRITEBACK_SYNC)
                return false;
 
        if (dc->partial_stripes_expensive &&
-           bcache_dev_stripe_dirty(dc, bio->bi_sector,
+           bcache_dev_stripe_dirty(dc, bio->bi_iter.bi_sector,
                                    bio_sectors(bio)))
                return true;
 
This page took 0.025781 seconds and 5 git commands to generate.