linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yi Li <yili@winhong.com>
To: colyli@suse.de
Cc: yilikernel@gmail.com, kent.overstreet@gmail.com,
	linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org,
	Yi Li <yili@winhong.com>
Subject: [PATCH v2] bcache: Trivial fix to register_bcache
Date: Mon, 21 Dec 2020 13:48:20 +0800	[thread overview]
Message-ID: <20201221054820.1005335-1-yili@winhong.com> (raw)
In-Reply-To: <20201221031739.563404-1-yili@winhong.com>

Trivial fix to no need to check the bdev and do bdput.

Fixes: 4e7b5671c6a8("block: remove i_bdev")

Signed-off-by: Yi Li <yili@winhong.com>
---
 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 f7ad1e26b013..4edf666860ad 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -2525,8 +2525,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.25.3




  reply	other threads:[~2020-12-21  5:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21  3:17 [PATCH] bcache: Trivial fix to bdput Yi Li
2020-12-21  5:48 ` Yi Li [this message]
2020-12-21  7:35 ` Coly Li
2020-12-21  9:49   ` [PATCH v4] bcache:remove a superfluous check in register_bcache Yi Li
2020-12-23  8:58     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201221054820.1005335-1-yili@winhong.com \
    --to=yili@winhong.com \
    --cc=colyli@suse.de \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yilikernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).