Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[linux-2.6-microblaze.git] / drivers / scsi / scsi_sysfs.c
index b71ea1a..32489d2 100644 (file)
@@ -475,6 +475,8 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)
        /* NULL queue means the device can't be used */
        sdev->request_queue = NULL;
 
+       sbitmap_free(&sdev->budget_map);
+
        mutex_lock(&sdev->inquiry_mutex);
        vpd_pg0 = rcu_replace_pointer(sdev->vpd_pg0, vpd_pg0,
                                       lockdep_is_held(&sdev->inquiry_mutex));
@@ -668,7 +670,7 @@ sdev_show_device_busy(struct device *dev, struct device_attribute *attr,
                char *buf)
 {
        struct scsi_device *sdev = to_scsi_device(dev);
-       return snprintf(buf, 20, "%d\n", atomic_read(&sdev->device_busy));
+       return snprintf(buf, 20, "%d\n", scsi_device_busy(sdev));
 }
 static DEVICE_ATTR(device_busy, S_IRUGO, sdev_show_device_busy, NULL);
 
@@ -1456,7 +1458,7 @@ void __scsi_remove_device(struct scsi_device *sdev)
 
        /*
         * Paired with the kref_get() in scsi_sysfs_initialize().  We have
-        * remoed sysfs visibility from the device, so make the target
+        * removed sysfs visibility from the device, so make the target
         * invisible if this was the last device underneath it.
         */
        scsi_target_reap(scsi_target(sdev));