* [PATCH 1/2] fs: bdev: fix conflicting comment from lookup_bdev
@ 2021-10-21 7:13 Jackie Liu
2021-10-21 7:13 ` [PATCH 2/2] scsi: bsg: fix errno when scsi_bsg_register_queue fails Jackie Liu
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jackie Liu @ 2021-10-21 7:13 UTC (permalink / raw)
To: axboe, hch; +Cc: linux-fsdevel, linux-block, liu.yun
From: Jackie Liu <liuyun01@kylinos.cn>
We switched to directly use dev_t to get block device, lookup changed the
meaning of use, now we fix this conflicting comment.
Fixes: 4e7b5671c6a8 ("block: remove i_bdev")
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
block/bdev.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/block/bdev.c b/block/bdev.c
index 485a258b0ab3..51d69243d315 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -962,9 +962,11 @@ EXPORT_SYMBOL(blkdev_put);
* @pathname: special file representing the block device
* @dev: return value of the block device's dev_t
*
- * Get a reference to the blockdevice at @pathname in the current
- * namespace if possible and return it. Return ERR_PTR(error)
- * otherwise.
+ * Lookup the block device's dev_t at @pathname in the current
+ * namespace if possible and return it by @dev.
+ *
+ * RETURNS:
+ * 0 if succeeded, errno otherwise.
*/
int lookup_bdev(const char *pathname, dev_t *dev)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] scsi: bsg: fix errno when scsi_bsg_register_queue fails
2021-10-21 7:13 [PATCH 1/2] fs: bdev: fix conflicting comment from lookup_bdev Jackie Liu
@ 2021-10-21 7:13 ` Jackie Liu
2021-10-21 7:33 ` Christoph Hellwig
2021-10-21 7:32 ` [PATCH 1/2] fs: bdev: fix conflicting comment from lookup_bdev Christoph Hellwig
2021-10-21 14:24 ` Jens Axboe
2 siblings, 1 reply; 6+ messages in thread
From: Jackie Liu @ 2021-10-21 7:13 UTC (permalink / raw)
To: axboe, hch; +Cc: linux-fsdevel, linux-block, liu.yun
From: Jackie Liu <liuyun01@kylinos.cn>
When the value of error is printed, it will always be 0. Here, we should be
print the correct error code when scsi_bsg_register_queue fails.
Fixes: ead09dd3aed5 ("scsi: bsg: Simplify device registration")
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
drivers/scsi/scsi_sysfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 86793259e541..d8789f6cda62 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -1379,6 +1379,7 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
* We're treating error on bsg register as non-fatal, so
* pretend nothing went wrong.
*/
+ error = PTR_ERR(sdev->bsg_dev);
sdev_printk(KERN_INFO, sdev,
"Failed to register bsg queue, errno=%d\n",
error);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] fs: bdev: fix conflicting comment from lookup_bdev
2021-10-21 7:13 [PATCH 1/2] fs: bdev: fix conflicting comment from lookup_bdev Jackie Liu
2021-10-21 7:13 ` [PATCH 2/2] scsi: bsg: fix errno when scsi_bsg_register_queue fails Jackie Liu
@ 2021-10-21 7:32 ` Christoph Hellwig
2021-10-21 14:24 ` Jens Axboe
2 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2021-10-21 7:32 UTC (permalink / raw)
To: Jackie Liu; +Cc: axboe, hch, linux-fsdevel, linux-block
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] scsi: bsg: fix errno when scsi_bsg_register_queue fails
2021-10-21 7:13 ` [PATCH 2/2] scsi: bsg: fix errno when scsi_bsg_register_queue fails Jackie Liu
@ 2021-10-21 7:33 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2021-10-21 7:33 UTC (permalink / raw)
To: Jackie Liu; +Cc: axboe, hch, linux-fsdevel, linux-block
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] fs: bdev: fix conflicting comment from lookup_bdev
2021-10-21 7:13 [PATCH 1/2] fs: bdev: fix conflicting comment from lookup_bdev Jackie Liu
2021-10-21 7:13 ` [PATCH 2/2] scsi: bsg: fix errno when scsi_bsg_register_queue fails Jackie Liu
2021-10-21 7:32 ` [PATCH 1/2] fs: bdev: fix conflicting comment from lookup_bdev Christoph Hellwig
@ 2021-10-21 14:24 ` Jens Axboe
2021-10-21 14:35 ` Jens Axboe
2 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2021-10-21 14:24 UTC (permalink / raw)
To: Jackie Liu, hch; +Cc: linux-fsdevel, linux-block
On Thu, 21 Oct 2021 15:13:43 +0800, Jackie Liu wrote:
> From: Jackie Liu <liuyun01@kylinos.cn>
>
> We switched to directly use dev_t to get block device, lookup changed the
> meaning of use, now we fix this conflicting comment.
>
>
Applied, thanks!
[1/2] fs: bdev: fix conflicting comment from lookup_bdev
commit: 057178cf518e699695a4b614a7a08c350b1fdcfd
[2/2] scsi: bsg: fix errno when scsi_bsg_register_queue fails
commit: e85c8915cf374af76efdc03a53a20fdec9d8eb5a
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] fs: bdev: fix conflicting comment from lookup_bdev
2021-10-21 14:24 ` Jens Axboe
@ 2021-10-21 14:35 ` Jens Axboe
0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2021-10-21 14:35 UTC (permalink / raw)
To: Jackie Liu, hch; +Cc: linux-fsdevel, linux-block
On 10/21/21 8:24 AM, Jens Axboe wrote:
> On Thu, 21 Oct 2021 15:13:43 +0800, Jackie Liu wrote:
>> From: Jackie Liu <liuyun01@kylinos.cn>
>>
>> We switched to directly use dev_t to get block device, lookup changed the
>> meaning of use, now we fix this conflicting comment.
>>
>>
>
> Applied, thanks!
>
> [1/2] fs: bdev: fix conflicting comment from lookup_bdev
> commit: 057178cf518e699695a4b614a7a08c350b1fdcfd
> [2/2] scsi: bsg: fix errno when scsi_bsg_register_queue fails
> commit: e85c8915cf374af76efdc03a53a20fdec9d8eb5a
Eh, I only applied 1/2. The other can go through the SCSI tree.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-21 14:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 7:13 [PATCH 1/2] fs: bdev: fix conflicting comment from lookup_bdev Jackie Liu
2021-10-21 7:13 ` [PATCH 2/2] scsi: bsg: fix errno when scsi_bsg_register_queue fails Jackie Liu
2021-10-21 7:33 ` Christoph Hellwig
2021-10-21 7:32 ` [PATCH 1/2] fs: bdev: fix conflicting comment from lookup_bdev Christoph Hellwig
2021-10-21 14:24 ` Jens Axboe
2021-10-21 14:35 ` 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).