atomic_inc(&ctx->cc_refcount);
set_bit(PTLRPC_CTX_CACHED_BIT, &ctx->cc_flags);
- cfs_hlist_add_head(&ctx->cc_cache, &gsec_kr->gsk_clist);
+ hlist_add_head(&ctx->cc_cache, &gsec_kr->gsk_clist);
if (is_root)
gsec_kr->gsk_root_ctx = ctx;
if (gsec_kr->gsk_root_ctx == ctx)
gsec_kr->gsk_root_ctx = NULL;
- cfs_hlist_del_init(&ctx->cc_cache);
+ hlist_del_init(&ctx->cc_cache);
atomic_dec(&ctx->cc_refcount);
spin_unlock_if(&sec->ps_lock, !locked);
/*
* caller should hold one ref on contexts in freelist.
*/
-static void dispose_ctx_list_kr(cfs_hlist_head_t *freelist)
+static void dispose_ctx_list_kr(struct hlist_head *freelist)
{
struct hlist_node __maybe_unused *pos, *next;
struct ptlrpc_cli_ctx *ctx;
if (ctx) {
LASSERT(atomic_read(&ctx->cc_refcount) > 0);
- LASSERT(!cfs_hlist_empty(&gsec_kr->gsk_clist));
+ LASSERT(!hlist_empty(&gsec_kr->gsk_clist));
atomic_inc(&ctx->cc_refcount);
}
if (gsec_kr == NULL)
RETURN(NULL);
- CFS_INIT_HLIST_HEAD(&gsec_kr->gsk_clist);
+ INIT_HLIST_HEAD(&gsec_kr->gsk_clist);
gsec_kr->gsk_root_ctx = NULL;
mutex_init(&gsec_kr->gsk_root_uc_lock);
#ifdef HAVE_KEYRING_UPCALL_SERIALIZED
CDEBUG(D_SEC, "destroy %s@%p\n", sec->ps_policy->sp_name, sec);
- LASSERT(cfs_hlist_empty(&gsec_kr->gsk_clist));
+ LASSERT(hlist_empty(&gsec_kr->gsk_clist));
LASSERT(gsec_kr->gsk_root_ctx == NULL);
gss_sec_destroy_common(gsec);
* flush context of root or all, we iterate through the list.
*/
static
-void flush_spec_ctx_cache_kr(struct ptlrpc_sec *sec,
- uid_t uid,
- int grace, int force)
+void flush_spec_ctx_cache_kr(struct ptlrpc_sec *sec, uid_t uid, int grace,
+ int force)
{
struct gss_sec_keyring *gsec_kr;
- struct hlist_head freelist = CFS_HLIST_HEAD_INIT;
+ struct hlist_head freelist = HLIST_HEAD_INIT;
struct hlist_node __maybe_unused *pos, *next;
struct ptlrpc_cli_ctx *ctx;
ENTRY;
atomic_inc(&ctx->cc_refcount);
if (ctx_unlist_kr(ctx, 1)) {
- cfs_hlist_add_head(&ctx->cc_cache, &freelist);
+ hlist_add_head(&ctx->cc_cache, &freelist);
} else {
LASSERT(atomic_read(&ctx->cc_refcount) >= 2);
atomic_dec(&ctx->cc_refcount);
void gss_sec_gc_ctx_kr(struct ptlrpc_sec *sec)
{
struct gss_sec_keyring *gsec_kr = sec2gsec_keyring(sec);
- struct hlist_head freelist = CFS_HLIST_HEAD_INIT;
+ struct hlist_head freelist = HLIST_HEAD_INIT;
struct hlist_node __maybe_unused *pos, *next;
struct ptlrpc_cli_ctx *ctx;
ENTRY;
atomic_inc(&ctx->cc_refcount);
if (cli_ctx_check_death(ctx) && ctx_unlist_kr(ctx, 1)) {
- cfs_hlist_add_head(&ctx->cc_cache, &freelist);
+ hlist_add_head(&ctx->cc_cache, &freelist);
CWARN("unhashed ctx %p\n", ctx);
} else {
LASSERT(atomic_read(&ctx->cc_refcount) >= 2);