This patch makes us hold the host reference count a little bit longer in
the /proc interface code.  We were releasing it too early before.

Greg, please apply.

Matt

# This is a BitKeeper generated patch for the following project:
# Project Name: greg k-h's linux 2.5 USB kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#                  ChangeSet    1.676   -> 1.677  
#       drivers/usb/storage/scsiglue.c  1.41    -> 1.42   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/02/02      [EMAIL PROTECTED]       1.677
# Hold the host lock a little bit longer for safety.
# --------------------------------------------
#
diff -Nru a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
--- a/drivers/usb/storage/scsiglue.c    Sun Feb  2 11:10:32 2003
+++ b/drivers/usb/storage/scsiglue.c    Sun Feb  2 11:10:32 2003
@@ -290,7 +290,6 @@
                return -ESRCH;
        }
        us = (struct us_data*)hostptr->hostdata[0];
-       scsi_host_put(hostptr);
 
        /* if we couldn't find it, we return an error */
        if (!us) {
@@ -308,6 +307,9 @@
        /* show the protocol and transport */
        SPRINTF("     Protocol: %s\n", us->protocol_name);
        SPRINTF("    Transport: %s\n", us->transport_name);
+
+       /* release the reference count on this host */
+       scsi_host_put(hostptr);
 
        /*
         * Calculate start of next buffer, and return value.
-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

Why am I talking to a toilet brush?
                                        -- CEO
User Friendly, 4/30/1998

Attachment: msg11214/pgp00000.pgp
Description: PGP signature

Reply via email to