[PATCH] Re: usbdevfs can be mounted multiple times

From: Alexander Viro (viro@math.psu.edu)
Date: Fri Mar 02 2001 - 16:42:43 EST

  • Next message: Collectively Unconscious: "I/O problem with sustained writes"

    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/



    This archive was generated by hypermail 2b29 : Fri Mar 02 2001 - 16:46:12 EST