Thread (108 messages) flat view 108 messages, 9 authors, 2023-10-02

Re: [PATCH 09/29] bcache: Convert to bdev_open_by_path()

From: Christian Brauner <brauner@kernel.org>
Date: 2023-08-25 12:08:12
Also in: linux-bcache, linux-fsdevel

On Wed, Aug 23, 2023 at 12:48:20PM +0200, Jan Kara wrote:
Convert bcache to use bdev_open_by_path() and pass the handle around.

CC: linux-bcache@vger.kernel.org
CC: Coly Li <colyli@suse.de
CC: Kent Overstreet <redacted>
Acked-by: Christoph Hellwig <hch@lst.de>
Acked-by: Coly Li <redacted>
Signed-off-by: Jan Kara <jack@suse.cz>
---
Looks good to me,
Acked-by: Christian Brauner <brauner@kernel.org>
-	if (!IS_ERR_OR_NULL(dc->bdev))
-		blkdev_put(dc->bdev, dc);
+	if (dc->bdev_handle)
+		bdev_release(dc->bdev_handle);
Fwiw, these conversions confused me a little as the old check gave the
impression that this could be set to an error pointer somehow.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help