Merge branch 'for-6.1/block' into block-6.1
authorJens Axboe <axboe@kernel.dk>
Mon, 10 Oct 2022 17:26:40 +0000 (11:26 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 10 Oct 2022 17:26:40 +0000 (11:26 -0600)
Merge in later fixes.

* for-6.1/block:
  block: fix leaking minors of hidden disks
  block: avoid sign extend problem with default queue flags mask
  blk-wbt: fix that 'rwb->wc' is always set to 1 in wbt_init()
  block: Remove the repeat word 'can'
  MAINTAINERS: Update SED-Opal Maintainers

MAINTAINERS
block/bio.c
block/blk-wbt.c
block/genhd.c
include/linux/blkdev.h

index 0dc4a76..1298471 100644 (file)
@@ -18447,8 +18447,7 @@ S:      Maintained
 F:     drivers/mmc/host/sdhci-esdhc-imx.c
 
 SECURE ENCRYPTING DEVICE (SED) OPAL DRIVER
-M:     Jonathan Derrick <jonathan.derrick@intel.com>
-M:     Revanth Rajashekar <revanth.rajashekar@intel.com>
+M:     Jonathan Derrick <jonathan.derrick@linux.dev>
 L:     linux-block@vger.kernel.org
 S:     Supported
 F:     block/opal_proto.h
index 7cb7d2f..6c470a5 100644 (file)
@@ -567,7 +567,7 @@ EXPORT_SYMBOL(bio_alloc_bioset);
  * be reused by calling bio_uninit() before calling bio_init() again.
  *
  * Note that unlike bio_alloc() or bio_alloc_bioset() allocations from this
- * function are not backed by a mempool can can fail.  Do not use this function
+ * function are not backed by a mempool can fail.  Do not use this function
  * for allocations in the file system I/O path.
  *
  * Returns: Pointer to new bio on success, NULL on failure.
index 2464679..c293e08 100644 (file)
@@ -841,12 +841,11 @@ int wbt_init(struct request_queue *q)
        rwb->last_comp = rwb->last_issue = jiffies;
        rwb->win_nsec = RWB_WINDOW_NSEC;
        rwb->enable_state = WBT_STATE_ON_DEFAULT;
-       rwb->wc = 1;
+       rwb->wc = test_bit(QUEUE_FLAG_WC, &q->queue_flags);
        rwb->rq_depth.default_depth = RWB_DEF_DEPTH;
        rwb->min_lat_nsec = wbt_default_latency_nsec(q);
 
        wbt_queue_depth_changed(&rwb->rqos);
-       wbt_set_write_cache(q, test_bit(QUEUE_FLAG_WC, &q->queue_flags));
 
        /*
         * Assign rwb and add the stats callback.
index 5143953..17b33c6 100644 (file)
@@ -507,6 +507,13 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk,
                 */
                dev_set_uevent_suppress(ddev, 0);
                disk_uevent(disk, KOBJ_ADD);
+       } else {
+               /*
+                * Even if the block_device for a hidden gendisk is not
+                * registered, it needs to have a valid bd_dev so that the
+                * freeing of the dynamic major works.
+                */
+               disk->part0->bd_dev = MKDEV(disk->major, disk->first_minor);
        }
 
        disk_update_readahead(disk);
index 3e187a0..50e358a 100644 (file)
@@ -580,9 +580,9 @@ struct request_queue {
 #define QUEUE_FLAG_NOWAIT       29     /* device supports NOWAIT */
 #define QUEUE_FLAG_SQ_SCHED     30     /* single queue style io dispatch */
 
-#define QUEUE_FLAG_MQ_DEFAULT  ((1 << QUEUE_FLAG_IO_STAT) |            \
-                                (1 << QUEUE_FLAG_SAME_COMP) |          \
-                                (1 << QUEUE_FLAG_NOWAIT))
+#define QUEUE_FLAG_MQ_DEFAULT  ((1UL << QUEUE_FLAG_IO_STAT) |          \
+                                (1UL << QUEUE_FLAG_SAME_COMP) |        \
+                                (1UL << QUEUE_FLAG_NOWAIT))
 
 void blk_queue_flag_set(unsigned int flag, struct request_queue *q);
 void blk_queue_flag_clear(unsigned int flag, struct request_queue *q);