Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251286
b: refs/heads/master
c: a1c15c5
h: refs/heads/master
v: v3
  • Loading branch information
Namhyung Kim authored and Jens Axboe committed May 24, 2011
1 parent ccc2f24 commit 9911394
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78f4bb367fd147a0e7e3998ba6e47109999d8814
refs/heads/master: a1c15c59feee36267c43142a41152fbf7402afb6
8 changes: 4 additions & 4 deletions trunk/drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ static struct kobject *loop_probe(dev_t dev, int *part, void *data)
struct kobject *kobj;

mutex_lock(&loop_devices_mutex);
lo = loop_init_one(dev & MINORMASK);
lo = loop_init_one(MINOR(dev) >> part_shift);
kobj = lo ? get_disk(lo->lo_disk) : ERR_PTR(-ENOMEM);
mutex_unlock(&loop_devices_mutex);

Expand Down Expand Up @@ -1699,10 +1699,10 @@ static int __init loop_init(void)

if (max_loop) {
nr = max_loop;
range = max_loop;
range = max_loop << part_shift;
} else {
nr = 8;
range = 1UL << (MINORBITS - part_shift);
range = 1UL << MINORBITS;
}

if (register_blkdev(LOOP_MAJOR, "loop"))
Expand Down Expand Up @@ -1741,7 +1741,7 @@ static void __exit loop_exit(void)
unsigned long range;
struct loop_device *lo, *next;

range = max_loop ? max_loop : 1UL << (MINORBITS - part_shift);
range = max_loop ? max_loop << part_shift : 1UL << MINORBITS;

list_for_each_entry_safe(lo, next, &loop_devices, lo_list)
loop_del_one(lo);
Expand Down

0 comments on commit 9911394

Please sign in to comment.