[PATCH] Re: usbdevfs can be mounted multiple times

Alexander Viro (viro@math.psu.edu)
Fri, 2 Mar 2001 16:42:43 -0500 (EST)


On Fri, 2 Mar 2001, Alexander Viro wrote:

> I.e. replace the last argument in declaration of usbdevfs with FS_SINGLE -
> without that we get a new instance every time.

Grr... Proper patch follows. Please, apply.
Cheers,
Al
--- drivers/usb/inode.c Fri Feb 16 18:24:31 2001
+++ drivers/usb/inode.c.new Fri Mar 2 16:39:44 2001
@@ -596,7 +596,7 @@
return NULL;
}

-static DECLARE_FSTYPE(usbdevice_fs_type, "usbdevfs", usbdevfs_read_super, 0);
+static DECLARE_FSTYPE(usbdevice_fs_type, "usbdevfs", usbdevfs_read_super, FS_SINGLE);

/* --------------------------------------------------------------------- */

@@ -691,6 +691,7 @@
return ret;
if ((ret = register_filesystem(&usbdevice_fs_type)))
usb_deregister(&usbdevfs_driver);
+ kern_mount(&usbdevice_fs_type);
#ifdef CONFIG_PROC_FS
/* create mount point for usbdevfs */
usbdir = proc_mkdir("usb", proc_bus);
@@ -702,6 +703,7 @@
{
usb_deregister(&usbdevfs_driver);
unregister_filesystem(&usbdevice_fs_type);
+ kern_umount(usbdevice_fs_type.kern_mnt);
#ifdef CONFIG_PROC_FS
if (usbdir)
remove_proc_entry("usb", proc_bus);

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