Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39746
b: refs/heads/master
c: ea6f94d
h: refs/heads/master
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Oct 17, 2006
1 parent 7aec31d commit 153cb03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 3864c4894a7f4c03d69a90082a5bb0ab10e437ab
refs/heads/master: ea6f94dfe9db4d19a39e774cfafa5c9428a9fdbc
12 changes: 6 additions & 6 deletions trunk/drivers/block/rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,12 @@ static int __init rd_init(void)
rd_disks[i] = alloc_disk(1);
if (!rd_disks[i])
goto out;

rd_queue[i] = blk_alloc_queue(GFP_KERNEL);
if (!rd_queue[i]) {
put_disk(rd_disks[i]);
goto out;
}
}

if (register_blkdev(RAMDISK_MAJOR, "ramdisk")) {
Expand All @@ -442,10 +448,6 @@ static int __init rd_init(void)
for (i = 0; i < CONFIG_BLK_DEV_RAM_COUNT; i++) {
struct gendisk *disk = rd_disks[i];

rd_queue[i] = blk_alloc_queue(GFP_KERNEL);
if (!rd_queue[i])
goto out_queue;

blk_queue_make_request(rd_queue[i], &rd_make_request);
blk_queue_hardsect_size(rd_queue[i], rd_blocksize);

Expand All @@ -466,8 +468,6 @@ static int __init rd_init(void)
CONFIG_BLK_DEV_RAM_COUNT, rd_size, rd_blocksize);

return 0;
out_queue:
unregister_blkdev(RAMDISK_MAJOR, "ramdisk");
out:
while (i--) {
put_disk(rd_disks[i]);
Expand Down

0 comments on commit 153cb03

Please sign in to comment.