Skip to contentSkip to conversation

bcache second wave patches for Linux v5.11

PATCH Applied Coly Li 2 participants 4 messages Dec 23, 2020

Subsystems (2)
lore
Share & tools
lore

Coly Li

author
#0 lore raw

cover bcache second wave patches for Linux v5.11

Hi Jens,

Here are the second wave patches for Linux v5.11. Especially the patch from Yi Li is a fix of a regression in this merge window.

Please take them, and thank you in advance.

Coly Li
---

Yi Li (1):
bcache:remove a superfluous check in register_bcache

Zheng Yongjun (1):
md/bcache: convert comma to semicolon

 drivers/md/bcache/super.c | 2 --
 drivers/md/bcache/sysfs.c | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
2.26.2
author
#1 lore raw

PATCH 1/2 bcache:remove a superfluous check in register_bcache

From: Yi Li <[email protected]>

There have no reassign the bdev after check It is IS_ERR. the double check !IS_ERR(bdev) is superfluous.

After commit 4e7b5671c6a8 ("block: remove i_bdev"),
"Switch the block device lookup interfaces to directly work with a dev_t so that struct block_device references are only acquired by the blkdev_get variants (and the blk-cgroup special case). This means that we now don't need an extra reference in the inode and can generally simplify handling of struct block_device to keep the lookups contained in the core block layer code."

so after lookup_bdev call, there no need to do bdput.

remove a superfluous check the bdev & don't call bdput after lookup_bdev.

Fixes 4e7b5671c6a8("block: remove i_bdev")
---
 drivers/md/bcache/super.c | 2 --
 1 file changed, 2 deletions(-)
drivers/md/bcache/super.c +0 -2
index 0e06d721cd8e..a4752ac410dc 100644
@@ -2535,8 +2535,6 @@ static ssize_t register_bcache(struct kobject *k, struct kobj_attribute *attr,
 			else
 				err = "device busy";
 			mutex_unlock(&bch_register_lock);
-			if (!IS_ERR(bdev))
-				bdput(bdev);
 			if (attr == &ksysfs_register_quiet)
 				goto done;
 		}
Signature · 1 line
2.26.2
author
#2 lore raw

PATCH 2/2 md/bcache: convert comma to semicolon

In reply to Coly Li

From: Zheng Yongjun <[email protected]>

Replace a comma between expression statements by a semicolon.

---
 drivers/md/bcache/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/bcache/sysfs.c +1 -1
index 554e3afc9b68..00a520c03f41 100644
@@ -404,7 +404,7 @@ STORE(__cached_dev)
 		if (!env)
 			return -ENOMEM;
 		add_uevent_var(env, "DRIVER=bcache");
-		add_uevent_var(env, "CACHED_UUID=%pU", dc->sb.uuid),
+		add_uevent_var(env, "CACHED_UUID=%pU", dc->sb.uuid);
 		add_uevent_var(env, "CACHED_LABEL=%s", buf);
 		kobject_uevent_env(&disk_to_dev(dc->disk.disk)->kobj,
 				   KOBJ_CHANGE,
Signature · 1 line
2.26.2
maintainer Applied
#3 lore raw
In reply to Coly Li
Quoted 4 lines · Coly Li

Hi Jens,

Here are the second wave patches for Linux v5.11. Especially the patch from Yi Li is a fix of a regression in this merge window.

Applied, thanks.

Signature · 1 line
Jens Axboe