On Mar 30 2007 01:48, Ken Chen wrote:
> On 3/30/07, Ken Chen <[EMAIL PROTECTED]> wrote:

> @@ -812,7 +811,7 @@ static int loop_set_fd
> lo->lo_queue->queuedata = lo;
> lo->lo_queue->unplug_fn = loop_unplug;
>
> -     set_capacity(disks[lo->lo_number], size);
> +     set_capacity(lo->lo_disk, size);
> bd_set_size(bdev, size << 9);
>
>       set_blocksize(bdev, lo_blocksize);
> @@ -832,7 +831,7 @@ out_clr:
> lo->lo_device = NULL;
> lo->lo_backing_file = NULL;
> lo->lo_flags = 0;
> -     set_capacity(disks[lo->lo_number], 0);
> +     set_capacity(lo->lo_disk, 0);
> invalidate_bdev(bdev, 0);
> bd_set_size(bdev, 0);
> mapping_set_gfp_mask(mapping, lo->old_gfp_mask);

Welcome to Google Mail, we eat your whitespace :-)

> +     sprintf(disk->disk_name, "loop%d", i);

Let's make this %u, no?

> +static struct kobject *loop_probe(dev_t dev, int *part, void *data)
> +{
> +     unsigned int number = dev & MINORMASK;
> +     struct loop_device *lo;
>
> -     for (i = 0; i < max_loop; i++) {
> -             disks[i] = alloc_disk(1);
> -             if (!disks[i])
> -                     goto out_mem3;
> -     }

Could not we use kobject_uevent(), like I did (though perhaps without
the k.oops), to make udev create a node?


Jan
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to