• Alan Stern's avatar
    [PATCH] USB: file-storage gadget: Add reference count for children · 87c4252a
    Alan Stern authored
    This patch (as601) adds a proper reference count to the file-storage
    gadget's main data structure, to keep track of references held by child
    devices (LUNs in this case).  Before this, the driver would wait for
    each child to be released before unbinding.
    
    While there's nothing really wrong with that (you can't create a hang by
    doing "rmmod g_file_storage </sys/.../lun0/ro" since the open file will
    prevent rmmod from running), the code might as well follow the standard
    procedures.  Besides, this shrinks the size of the structure by a few
    words...  :-)
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    87c4252a
file_storage.c 113 KB