diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2021-11-03 16:04:34 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-11-04 05:48:50 -0600 |
commit | 26e06f5b13671d194d67ae8e2b66f524ab174153 (patch) | |
tree | ab0d1ae07740616b1cb4c77e275ada5f55a95082 /lib/test_fortify/write_overflow-strcpy-lit.c | |
parent | 4ddb85d36613c45bde00d368bf9f357bd0708a0c (diff) |
block: update __register_blkdev() probe documentation
__register_blkdev() is used to register a probe callback, and
that callback is typically used to call add_disk(). Now that
we are able to capture errors for add_disk(), we need to fix
those probe calls where add_disk() fails and clean up resources.
We don't extend the probe call to return the error given:
1) we'd have to always special-case the case where the disk
was already present, as otherwise concurrent requests to
open an existing block device would fail, and this would be
a userspace visible change
2) the error from ilookup() on blkdev_get_no_open() is sufficient
3) The only thing the probe call is used for is to support
pre-devtmpfs, pre-udev semantics that want to create disks when
their pre-created device node is accessed, and so we don't care
for failures on probe there.
Expand documentation for the probe callback to ensure users cleanup
resources if add_disk() is used and to clarify this interface may be
removed in the future.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20211103230437.1639990-12-mcgrof@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/test_fortify/write_overflow-strcpy-lit.c')
0 files changed, 0 insertions, 0 deletions