bcache: Use the blk_queue_flag_{set,clear}() functions
authorBart Van Assche <bart.vanassche@wdc.com>
Thu, 8 Mar 2018 01:10:07 +0000 (17:10 -0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Mar 2018 21:13:48 +0000 (14:13 -0700)
Use the blk_queue_flag_{set,clear}() functions instead of open-coding
these.

Cc: Kent Overstreet <kent.overstreet@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Michael Lyle <mlyle@lyle.org>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/super.c

index 4d1d8dfb2d2a4d1de7d6ee59e2b8d802a68827e5..e8dfa804bd984656ed518f15e6dadfdf14d75cbf 100644 (file)
@@ -833,9 +833,9 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size,
        q->limits.io_min                = block_size;
        q->limits.logical_block_size    = block_size;
        q->limits.physical_block_size   = block_size;
-       set_bit(QUEUE_FLAG_NONROT,      &d->disk->queue->queue_flags);
-       clear_bit(QUEUE_FLAG_ADD_RANDOM, &d->disk->queue->queue_flags);
-       set_bit(QUEUE_FLAG_DISCARD,     &d->disk->queue->queue_flags);
+       blk_queue_flag_set(QUEUE_FLAG_NONROT, d->disk->queue);
+       blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, d->disk->queue);
+       blk_queue_flag_set(QUEUE_FLAG_DISCARD, d->disk->queue);
 
        blk_queue_write_cache(q, true, true);