loop.c (8b52d8be86d723085784317427d339528766d9a3) loop.c (bd5c39edad535d9f6ccb99633930f9f7b768593c)
1/*
2 * linux/drivers/block/loop.c
3 *
4 * Written by Theodore Ts'o, 3/29/93
5 *
6 * Copyright 1993 by Theodore Ts'o. Redistribution of this file is
7 * permitted under the GNU General Public License.
8 *

--- 2535 unchanged lines hidden (view full) ---

2544 struct loop_device *lo = ptr;
2545
2546 loop_remove(lo);
2547 return 0;
2548}
2549
2550static void __exit loop_exit(void)
2551{
1/*
2 * linux/drivers/block/loop.c
3 *
4 * Written by Theodore Ts'o, 3/29/93
5 *
6 * Copyright 1993 by Theodore Ts'o. Redistribution of this file is
7 * permitted under the GNU General Public License.
8 *

--- 2535 unchanged lines hidden (view full) ---

2544 struct loop_device *lo = ptr;
2545
2546 loop_remove(lo);
2547 return 0;
2548}
2549
2550static void __exit loop_exit(void)
2551{
2552 mutex_lock(&loop_ctl_mutex);
2553 unregister_blkdev(LOOP_MAJOR, "loop");
2554 misc_deregister(&loop_misc);
2555
2552 unregister_blkdev(LOOP_MAJOR, "loop");
2553 misc_deregister(&loop_misc);
2554
2555 mutex_lock(&loop_ctl_mutex);
2556 idr_for_each(&loop_index_idr, &loop_exit_cb, NULL);
2556 idr_for_each(&loop_index_idr, &loop_exit_cb, NULL);
2557 idr_destroy(&loop_index_idr);
2558 mutex_unlock(&loop_ctl_mutex);
2557 mutex_unlock(&loop_ctl_mutex);
2558
2559 idr_destroy(&loop_index_idr);
2559}
2560
2561module_init(loop_init);
2562module_exit(loop_exit);
2563
2564#ifndef MODULE
2565static int __init max_loop_setup(char *str)
2566{
2567 max_loop = simple_strtol(str, NULL, 0);
2568 return 1;
2569}
2570
2571__setup("max_loop=", max_loop_setup);
2572#endif
2560}
2561
2562module_init(loop_init);
2563module_exit(loop_exit);
2564
2565#ifndef MODULE
2566static int __init max_loop_setup(char *str)
2567{
2568 max_loop = simple_strtol(str, NULL, 0);
2569 return 1;
2570}
2571
2572__setup("max_loop=", max_loop_setup);
2573#endif