unhash the new added export when such obd device is stopping.
i=andreas.dilger
i=vitaly.fertman
struct obd_uuid *cluuid)
{
struct obd_export *export;
struct obd_uuid *cluuid)
{
struct obd_export *export;
+ cfs_hash_t *hash = NULL;
- cfs_hash_putref(hash);
-
cfs_spin_lock(&obd->obd_dev_lock);
cfs_spin_lock(&obd->obd_dev_lock);
+ if (obd->obd_stopping) {
+ cfs_hash_del(hash, cluuid, &export->exp_uuid_hash);
GOTO(exit_unlock, rc = -ENODEV);
GOTO(exit_unlock, rc = -ENODEV);
class_incref(obd, "export", export);
cfs_list_add(&export->exp_obd_chain, &export->exp_obd->obd_exports);
class_incref(obd, "export", export);
cfs_list_add(&export->exp_obd_chain, &export->exp_obd->obd_exports);
&export->exp_obd->obd_exports_timed);
export->exp_obd->obd_num_exports++;
cfs_spin_unlock(&obd->obd_dev_lock);
&export->exp_obd->obd_exports_timed);
export->exp_obd->obd_num_exports++;
cfs_spin_unlock(&obd->obd_dev_lock);
RETURN(export);
exit_unlock:
cfs_spin_unlock(&obd->obd_dev_lock);
exit_err:
RETURN(export);
exit_unlock:
cfs_spin_unlock(&obd->obd_dev_lock);
exit_err:
+ if (hash)
+ cfs_hash_putref(hash);
class_handle_unhash(&export->exp_handle);
LASSERT(cfs_hlist_unhashed(&export->exp_uuid_hash));
obd_destroy_export(export);
class_handle_unhash(&export->exp_handle);
LASSERT(cfs_hlist_unhashed(&export->exp_uuid_hash));
obd_destroy_export(export);