Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'block-5.17-2022-03-18' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:

- Revert of a nvme target feature (Hannes)

- Fix a memory leak with rq-qos (Ming)

* tag 'block-5.17-2022-03-18' of git://git.kernel.dk/linux-block:
nvmet: revert "nvmet: make discovery NQN configurable"
block: release rq qos structures for queue without disk

+5 -41
+4
block/blk-core.c
··· 50 50 #include "blk-mq-sched.h" 51 51 #include "blk-pm.h" 52 52 #include "blk-throttle.h" 53 + #include "blk-rq-qos.h" 53 54 54 55 struct dentry *blk_debugfs_root; 55 56 ··· 314 313 * after draining finished. 315 314 */ 316 315 blk_freeze_queue(q); 316 + 317 + /* cleanup rq qos structures for queue without disk */ 318 + rq_qos_exit(q); 317 319 318 320 blk_queue_flag_set(QUEUE_FLAG_DEAD, q); 319 321
-39
drivers/nvme/target/configfs.c
··· 1233 1233 } 1234 1234 CONFIGFS_ATTR(nvmet_subsys_, attr_model); 1235 1235 1236 - static ssize_t nvmet_subsys_attr_discovery_nqn_show(struct config_item *item, 1237 - char *page) 1238 - { 1239 - return snprintf(page, PAGE_SIZE, "%s\n", 1240 - nvmet_disc_subsys->subsysnqn); 1241 - } 1242 - 1243 - static ssize_t nvmet_subsys_attr_discovery_nqn_store(struct config_item *item, 1244 - const char *page, size_t count) 1245 - { 1246 - struct nvmet_subsys *subsys = to_subsys(item); 1247 - char *subsysnqn; 1248 - int len; 1249 - 1250 - len = strcspn(page, "\n"); 1251 - if (!len) 1252 - return -EINVAL; 1253 - 1254 - subsysnqn = kmemdup_nul(page, len, GFP_KERNEL); 1255 - if (!subsysnqn) 1256 - return -ENOMEM; 1257 - 1258 - /* 1259 - * The discovery NQN must be different from subsystem NQN. 1260 - */ 1261 - if (!strcmp(subsysnqn, subsys->subsysnqn)) { 1262 - kfree(subsysnqn); 1263 - return -EBUSY; 1264 - } 1265 - down_write(&nvmet_config_sem); 1266 - kfree(nvmet_disc_subsys->subsysnqn); 1267 - nvmet_disc_subsys->subsysnqn = subsysnqn; 1268 - up_write(&nvmet_config_sem); 1269 - 1270 - return count; 1271 - } 1272 - CONFIGFS_ATTR(nvmet_subsys_, attr_discovery_nqn); 1273 - 1274 1236 #ifdef CONFIG_BLK_DEV_INTEGRITY 1275 1237 static ssize_t nvmet_subsys_attr_pi_enable_show(struct config_item *item, 1276 1238 char *page) ··· 1262 1300 &nvmet_subsys_attr_attr_cntlid_min, 1263 1301 &nvmet_subsys_attr_attr_cntlid_max, 1264 1302 &nvmet_subsys_attr_attr_model, 1265 - &nvmet_subsys_attr_attr_discovery_nqn, 1266 1303 #ifdef CONFIG_BLK_DEV_INTEGRITY 1267 1304 &nvmet_subsys_attr_attr_pi_enable, 1268 1305 #endif
+1 -2
drivers/nvme/target/core.c
··· 1493 1493 if (!port) 1494 1494 return NULL; 1495 1495 1496 - if (!strcmp(NVME_DISC_SUBSYS_NAME, subsysnqn) || 1497 - !strcmp(nvmet_disc_subsys->subsysnqn, subsysnqn)) { 1496 + if (!strcmp(NVME_DISC_SUBSYS_NAME, subsysnqn)) { 1498 1497 if (!kref_get_unless_zero(&nvmet_disc_subsys->ref)) 1499 1498 return NULL; 1500 1499 return nvmet_disc_subsys;