Skip to content

Commit 23881ae

Browse files
Mauricio Faria de Oliveiraaxboe
authored andcommitted
loop: deprecate autoloading callback loop_probe()
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 fbdee71 ("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>
1 parent 1063973 commit 23881ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/block/loop.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,6 +2093,7 @@ static void loop_remove(struct loop_device *lo)
20932093
put_disk(lo->lo_disk);
20942094
}
20952095

2096+
#ifdef CONFIG_BLOCK_LEGACY_AUTOLOAD
20962097
static void loop_probe(dev_t dev)
20972098
{
20982099
int idx = MINOR(dev) >> part_shift;
@@ -2101,6 +2102,9 @@ static void loop_probe(dev_t dev)
21012102
return;
21022103
loop_add(idx);
21032104
}
2105+
#else
2106+
#define loop_probe NULL
2107+
#endif /* !CONFIG_BLOCK_LEGACY_AUTOLOAD */
21042108

21052109
static int loop_control_remove(int idx)
21062110
{

0 commit comments

Comments
 (0)