@@ -166,11 +166,12 @@ static int scsi_dh_handler_attach(struct
return err;
}
-static void __detach_handler (struct kref *kref)
+void scsi_dh_handler_cleanup(struct kref *kref)
{
struct scsi_dh_data *scsi_dh_data = container_of(kref, struct scsi_dh_data, kref);
scsi_dh_data->scsi_dh->detach(scsi_dh_data->sdev);
}
+EXPORT_SYMBOL_GPL(scsi_dh_handler_cleanup);
/*
* scsi_dh_handler_detach - Detach a device handler from a device
@@ -193,7 +194,7 @@ static void scsi_dh_handler_detach(struc
scsi_dh = sdev->scsi_dh_data->scsi_dh;
if (scsi_dh && scsi_dh->detach)
- kref_put(&sdev->scsi_dh_data->kref, __detach_handler);
+ kref_put(&sdev->scsi_dh_data->kref, scsi_dh_handler_cleanup);
}
/*
@@ -61,6 +61,7 @@ extern int scsi_dh_handler_exist(const c
extern int scsi_dh_attach(struct request_queue *, const char *);
extern void scsi_dh_detach(struct request_queue *);
extern int scsi_dh_set_params(struct request_queue *, const char *);
+extern void scsi_dh_handler_cleanup(struct kref *kref);
#else
static inline int scsi_dh_activate(struct request_queue *req,
activate_complete fn, void *data)
@@ -84,4 +85,8 @@ static inline int scsi_dh_set_params(str
{
return -SCSI_DH_NOSYS;
}
+static void scsi_dh_handler_cleanup(struct kref *kref)
+{
+ return;
+}
#endif