Re: [PATCH] Symlink /sys/class/block to /sys/block

From: Greg KH
Date: Tue Feb 22 2005 - 14:09:20 EST


On Sat, Feb 19, 2005 at 11:29:13PM +0000, Malcolm Rowe wrote:
> Greg,
>
> Following the discussion in [1], the attached patch creates /sys/class/block
> as a symlink to /sys/block. The patch applies to 2.6.11-rc4-bk7.
>
> Please cc: me on any replies - I'm not subscribed to the mailing list.

Hm, your patch is linewrapped, and can't be applied :(

But more importantly:

> @@ -406,6 +420,7 @@
> static void disk_release(struct kobject * kobj)
> {
> struct gendisk *disk = to_disk(kobj);
> + sysfs_remove_link(&class_subsys.kset.kobj, "block");
> kfree(disk->random);
> kfree(disk->part);
> free_disk_stats(disk);

Did you try to remove a disk (like a usb device) and see what happens
here? Hint, this isn't the proper place to remove the symlink...

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/