Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252251
b: refs/heads/master
c: af46566
h: refs/heads/master
i:
  252249: 73d3fb4
  252247: bf8ec31
v: v3
  • Loading branch information
Namhyung Kim authored and Jens Axboe committed May 26, 2011
1 parent fc56fb1 commit cac0a67
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: 315980c8688c4b06713c1a5fe9d64cdf8ab57a72
refs/heads/master: af46566885a373b0a526932484cd8fef8de7b598
8 changes: 4 additions & 4 deletions trunk/drivers/block/brd.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ static struct kobject *brd_probe(dev_t dev, int *part, void *data)
struct kobject *kobj;

mutex_lock(&brd_devices_mutex);
brd = brd_init_one(dev & MINORMASK);
brd = brd_init_one(MINOR(dev) >> part_shift);
kobj = brd ? get_disk(brd->brd_disk) : ERR_PTR(-ENOMEM);
mutex_unlock(&brd_devices_mutex);

Expand Down Expand Up @@ -589,10 +589,10 @@ static int __init brd_init(void)

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

if (register_blkdev(RAMDISK_MAJOR, "ramdisk"))
Expand Down Expand Up @@ -631,7 +631,7 @@ static void __exit brd_exit(void)
unsigned long range;
struct brd_device *brd, *next;

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

list_for_each_entry_safe(brd, next, &brd_devices, brd_list)
brd_del_one(brd);
Expand Down

0 comments on commit cac0a67

Please sign in to comment.