diff mbox series

[5/5] bcache: don't clear the flag that is not set

Message ID 20230424073023.38935-6-kch@nvidia.com (mailing list archive)
State New, archived
Headers show
Series block/drivers: don't clear the flag that is not set | expand

Commit Message

Chaitanya Kulkarni April 24, 2023, 7:30 a.m. UTC
QUEUE_FLAG_ADD_RANDOM is not set in bcache_device_init() before we clear
it. There is no point in clearing the flag that is not set.
Remove blk_queue_flag_clear() for QUEUE_FLAG_ADD_RANDOM.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
 drivers/md/bcache/super.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Coly Li April 24, 2023, 10:19 a.m. UTC | #1
On Mon, Apr 24, 2023 at 12:30:23AM -0700, Chaitanya Kulkarni wrote:
> QUEUE_FLAG_ADD_RANDOM is not set in bcache_device_init() before we clear
> it. There is no point in clearing the flag that is not set.
> Remove blk_queue_flag_clear() for QUEUE_FLAG_ADD_RANDOM.
> 
> Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>

Acked-by: Coly Li <colyli@suse.de>

Thanks.

> ---
> drivers/md/bcache/super.c | 1 -
> 1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
> index ba3909bb6bea..7e9d19fd21dd 100644
> --- a/drivers/md/bcache/super.c
> +++ b/drivers/md/bcache/super.c
> @@ -971,7 +971,6 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size,
> 	}
> 
> 	blk_queue_flag_set(QUEUE_FLAG_NONROT, d->disk->queue);
> -	blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, d->disk->queue);
> 
> 	blk_queue_write_cache(q, true, true);
> 
> -- 
> 2.40.0
>
diff mbox series

Patch

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index ba3909bb6bea..7e9d19fd21dd 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -971,7 +971,6 @@  static int bcache_device_init(struct bcache_device *d, unsigned int block_size,
 	}
 
 	blk_queue_flag_set(QUEUE_FLAG_NONROT, d->disk->queue);
-	blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, d->disk->queue);
 
 	blk_queue_write_cache(q, true, true);