linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] bcache second wave patches for Linux v5.11
@ 2020-12-23 15:04 Coly Li
  2020-12-23 15:04 ` [PATCH 1/2] bcache:remove a superfluous check in register_bcache Coly Li
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Coly Li @ 2020-12-23 15:04 UTC (permalink / raw)
  To: axboe; +Cc: linux-bcache, linux-block, 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.

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(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] bcache:remove a superfluous check in register_bcache
  2020-12-23 15:04 [PATCH 0/2] bcache second wave patches for Linux v5.11 Coly Li
@ 2020-12-23 15:04 ` Coly Li
  2020-12-23 15:04 ` [PATCH 2/2] md/bcache: convert comma to semicolon Coly Li
  2020-12-23 16:25 ` [PATCH 0/2] bcache second wave patches for Linux v5.11 Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Coly Li @ 2020-12-23 15:04 UTC (permalink / raw)
  To: axboe; +Cc: linux-bcache, linux-block, Yi Li, Christoph Hellwig, Coly Li

From: Yi Li <yili@winhong.com>

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")
Signed-off-by: Yi Li <yili@winhong.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Coly Li <colyli@suse.de>
---
 drivers/md/bcache/super.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 0e06d721cd8e..a4752ac410dc 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -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;
 		}
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] md/bcache: convert comma to semicolon
  2020-12-23 15:04 [PATCH 0/2] bcache second wave patches for Linux v5.11 Coly Li
  2020-12-23 15:04 ` [PATCH 1/2] bcache:remove a superfluous check in register_bcache Coly Li
@ 2020-12-23 15:04 ` Coly Li
  2020-12-23 16:25 ` [PATCH 0/2] bcache second wave patches for Linux v5.11 Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Coly Li @ 2020-12-23 15:04 UTC (permalink / raw)
  To: axboe; +Cc: linux-bcache, linux-block, Zheng Yongjun, Coly Li

From: Zheng Yongjun <zhengyongjun3@huawei.com>

Replace a comma between expression statements by a semicolon.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: Coly Li <colyli@sue.de>
---
 drivers/md/bcache/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
index 554e3afc9b68..00a520c03f41 100644
--- a/drivers/md/bcache/sysfs.c
+++ b/drivers/md/bcache/sysfs.c
@@ -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,
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] bcache second wave patches for Linux v5.11
  2020-12-23 15:04 [PATCH 0/2] bcache second wave patches for Linux v5.11 Coly Li
  2020-12-23 15:04 ` [PATCH 1/2] bcache:remove a superfluous check in register_bcache Coly Li
  2020-12-23 15:04 ` [PATCH 2/2] md/bcache: convert comma to semicolon Coly Li
@ 2020-12-23 16:25 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2020-12-23 16:25 UTC (permalink / raw)
  To: Coly Li; +Cc: linux-bcache, linux-block

On 12/23/20 8:04 AM, Coly Li wrote:
> 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.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-23 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-23 15:04 [PATCH 0/2] bcache second wave patches for Linux v5.11 Coly Li
2020-12-23 15:04 ` [PATCH 1/2] bcache:remove a superfluous check in register_bcache Coly Li
2020-12-23 15:04 ` [PATCH 2/2] md/bcache: convert comma to semicolon Coly Li
2020-12-23 16:25 ` [PATCH 0/2] bcache second wave patches for Linux v5.11 Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).