block/loop: don't use idr_remove_all()
authorTejun Heo <tj@kernel.org>
Thu, 28 Feb 2013 01:03:37 +0000 (17:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Feb 2013 03:10:13 +0000 (19:10 -0800)
idr_destroy() can destroy idr by itself and idr_remove_all() is being
deprecated.  Drop its usage.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/loop.c

index 8031a8c..c674e54 100644 (file)
@@ -1911,7 +1911,6 @@ static void __exit loop_exit(void)
        range = max_loop ? max_loop << part_shift : 1UL << MINORBITS;
 
        idr_for_each(&loop_index_idr, &loop_exit_cb, NULL);
-       idr_remove_all(&loop_index_idr);
        idr_destroy(&loop_index_idr);
 
        blk_unregister_region(MKDEV(LOOP_MAJOR, 0), range);