This is causing non-NULL security flavors to fail during cleanup.
This reverts commit
504ca288d99779812495a91345421ad4ad8f7d95.
Change-Id: I2f370a465c3b2bb49983d13ff98c9e7dec3d15a5
Reviewed-on: http://review.whamcloud.com/17709
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
* <shaver> // XXX do not look into _superhack with remaining eye
* <shaver> // XXX if this were any uglier, I'd get my own show on MTV */
extern int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c);
-extern void (*sptlrpc_sec_put_superhack)(struct obd_import *imp);
/* obd_mount.c */
#ifdef HAVE_SERVER_SUPPORT
void client_destroy_import(struct obd_import *imp)
{
+ /* Drop security policy instance after all RPCs have finished/aborted
+ * to let all busy contexts be released. */
class_import_get(imp);
class_destroy_import(imp);
+ sptlrpc_import_sec_put(imp);
class_import_put(imp);
}
EXPORT_SYMBOL(client_destroy_import);
int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c);
EXPORT_SYMBOL(ptlrpc_put_connection_superhack);
-void (*sptlrpc_sec_put_superhack)(struct obd_import *imp);
-EXPORT_SYMBOL(sptlrpc_sec_put_superhack);
/*
* support functions: we could use inter-module communication, but this
if (atomic_dec_and_test(&imp->imp_refcount)) {
CDEBUG(D_INFO, "final put import %p\n", imp);
- /* Drop security policy instance after all RPCs have
- * finished/aborted to let all busy contexts be released. */
- sptlrpc_sec_put_superhack(imp);
-
obd_zombie_import_add(imp);
}
GOTO(err_portals, rc);
ptlrpc_put_connection_superhack = ptlrpc_connection_put;
- sptlrpc_sec_put_superhack = sptlrpc_import_sec_put;
rc = ptlrpc_start_pinger();
if (rc)
}
*sec = sptlrpc_import_sec_ref(imp);
+ /* Only output an error when the import is still active */
if (*sec == NULL) {
- CERROR("import %p (%s) with no sec\n",
- imp, ptlrpc_import_state_name(imp->imp_state));
+ if (list_empty(&imp->imp_zombie_chain))
+ CERROR("import %p (%s) with no sec\n",
+ imp, ptlrpc_import_state_name(imp->imp_state));
return -EACCES;
}