aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMauricio Faria de Oliveira2023-07-20 11:30:32 -0300
committerGreg Kroah-Hartman2024-01-01 12:39:09 +0000
commita413b88cdb69cdd7922d6481fead43e52be19710 (patch)
tree1dc74554113f92a6a0b8d0f560a103c743c2e801 /drivers
parent75c27bdb21449e5ab5ddc3546fee1036ada0b587 (diff)
loop: deprecate autoloading callback loop_probe()
commit 23881aec85f3219e8462e87c708815ee2cd82358 upstream. The 'probe' callback in __register_blkdev() is only used under the CONFIG_BLOCK_LEGACY_AUTOLOAD deprecation guard. The loop_probe() function is only used for that callback, so guard it too, accordingly. See commit fbdee71bb5d8 ("block: deprecate autoloading based on dev_t"). Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20230720143033.841001-2-mfo@canonical.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Cc: Sven Joachim <svenjoac@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/loop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index d74f8eb7f529..127e3ceb5979 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -2118,6 +2118,7 @@ static void loop_remove(struct loop_device *lo)
put_disk(lo->lo_disk);
}
+#ifdef CONFIG_BLOCK_LEGACY_AUTOLOAD
static void loop_probe(dev_t dev)
{
int idx = MINOR(dev) >> part_shift;
@@ -2126,6 +2127,9 @@ static void loop_probe(dev_t dev)
return;
loop_add(idx);
}
+#else
+#define loop_probe NULL
+#endif /* !CONFIG_BLOCK_LEGACY_AUTOLOAD */
static int loop_control_remove(int idx)
{