'cfs_hlist_empty', 'hlist_empty',
'cfs_hlist_entry', 'hlist_entry',
'cfs_hlist_for_each', 'hlist_for_each',
- 'cfs_hlist_for_each_entry', 'hlist_for_each_entry',
- 'cfs_hlist_for_each_entry_continue',
- 'hlist_for_each_entry_continue',
- 'cfs_hlist_for_each_entry_from',
- 'hlist_for_each_entry_from',
- 'cfs_hlist_for_each_entry_safe',
- 'hlist_for_each_entry_safe',
'cfs_hlist_for_each_safe', 'hlist_for_each_safe',
'cfs_hlist_head_t', 'struct hlist_head',
'cfs_hlist_node_t', 'struct hlist_node',
hlist_for_each_safe(pos, n, head)
#ifdef HAVE_HLIST_FOR_EACH_3ARG
#define cfs_hlist_for_each_entry(tpos, pos, head, member) \
- pos = NULL; hlist_for_each_entry(tpos, head, member)
-#else
-#define cfs_hlist_for_each_entry(tpos, pos, head, member) \
- hlist_for_each_entry(tpos, pos, head, member)
-#endif
+ hlist_for_each_entry(tpos, head, member)
+#define cfs_hlist_for_each_entry_safe(tpos, pos, n, head, member) \
+ hlist_for_each_entry_safe(tpos, n, head, member)
#define cfs_hlist_for_each_entry_continue(tpos, pos, member) \
- hlist_for_each_entry_continue(tpos, pos, member)
+ hlist_for_each_entry_continue(tpos, member)
#define cfs_hlist_for_each_entry_from(tpos, pos, member) \
- hlist_for_each_entry_from(tpos, pos, member)
-#ifdef HAVE_HLIST_FOR_EACH_3ARG
-#define cfs_hlist_for_each_entry_safe(tpos, pos, n, head, member) \
- pos = NULL; hlist_for_each_entry_safe(tpos, n, head, member)
+ hlist_for_each_entry_from(tpos, member)
#else
#define cfs_hlist_for_each_entry(tpos, pos, head, member) \
hlist_for_each_entry(tpos, pos, head, member)
#define cfs_hlist_for_each_entry_safe(tpos, pos, n, head, member) \
hlist_for_each_entry_safe(tpos, pos, n, head, member)
+#define cfs_hlist_for_each_entry_continue(tpos, pos, member) \
+ hlist_for_each_entry_continue(tpos, pos, member)
+#define cfs_hlist_for_each_entry_from(tpos, pos, member) \
+ hlist_for_each_entry_from(tpos, pos, member)
#endif
#define cfs_list_for_each_entry_typed(pos, head, type, member) \
void free_rmtperm_hash(struct hlist_head *hash)
{
- int i;
- struct ll_remote_perm *lrp;
- struct hlist_node *node, *next;
+ int i;
+ struct ll_remote_perm *lrp;
+ struct hlist_node __maybe_unused *node;
+ struct hlist_node *next;
if(!hash)
return;
static int do_check_remote_perm(struct ll_inode_info *lli, int mask)
{
struct hlist_head *head;
- struct ll_remote_perm *lrp;
- struct hlist_node *node;
- int found = 0, rc;
- ENTRY;
+ struct ll_remote_perm *lrp;
+ struct hlist_node __maybe_unused *node;
+ int found = 0, rc;
+ ENTRY;
if (!lli->lli_remote_perms)
RETURN(-ENOENT);
int ll_update_remote_perm(struct inode *inode, struct mdt_remote_perm *perm)
{
- struct ll_inode_info *lli = ll_i2info(inode);
- struct ll_remote_perm *lrp = NULL, *tmp = NULL;
+ struct ll_inode_info *lli = ll_i2info(inode);
+ struct ll_remote_perm *lrp = NULL, *tmp = NULL;
struct hlist_head *head, *perm_hash = NULL;
- struct hlist_node *node;
- ENTRY;
+ struct hlist_node __maybe_unused *node;
+ ENTRY;
LASSERT(ll_i2sbi(inode)->ll_flags & LL_SBI_RMT_CLIENT);
void cleanup_capa_hash(struct hlist_head *hash)
{
- int i;
- struct hlist_node *pos, *next;
+ struct hlist_node __maybe_unused *pos;
+ struct hlist_node *next;
struct obd_capa *oc;
+ int i;
spin_lock(&capa_lock);
for (i = 0; i < NR_CAPAHASH; i++) {
static struct obd_capa *find_capa(struct lustre_capa *capa,
struct hlist_head *head, int alive)
{
- struct hlist_node *pos;
- struct obd_capa *ocapa;
- int len = alive ? offsetof(struct lustre_capa, lc_keyid):sizeof(*capa);
-
- cfs_hlist_for_each_entry(ocapa, pos, head, u.tgt.c_hash) {
- if (memcmp(&ocapa->c_capa, capa, len))
- continue;
- /* don't return one that will expire soon in this case */
- if (alive && capa_is_to_expire(ocapa))
- continue;
+ struct hlist_node __maybe_unused *pos;
+ struct obd_capa *ocapa;
+ int len = alive ? offsetof(struct lustre_capa, lc_keyid):sizeof(*capa);
+
+ cfs_hlist_for_each_entry(ocapa, pos, head, u.tgt.c_hash) {
+ if (memcmp(&ocapa->c_capa, capa, len))
+ continue;
+ /* don't return one that will expire soon in this case */
+ if (alive && capa_is_to_expire(ocapa))
+ continue;
LASSERT(capa_on_server(ocapa));
*/
static void dispose_ctx_list_kr(cfs_hlist_head_t *freelist)
{
- cfs_hlist_node_t *pos, *next;
- struct ptlrpc_cli_ctx *ctx;
- struct gss_cli_ctx *gctx;
+ struct hlist_node __maybe_unused *pos, *next;
+ struct ptlrpc_cli_ctx *ctx;
+ struct gss_cli_ctx *gctx;
- cfs_hlist_for_each_entry_safe(ctx, pos, next, freelist, cc_cache) {
- cfs_hlist_del_init(&ctx->cc_cache);
+ cfs_hlist_for_each_entry_safe(ctx, pos, next, freelist, cc_cache) {
+ hlist_del_init(&ctx->cc_cache);
/* reverse ctx: update current seq to buddy svcctx if exist.
* ideally this should be done at gss_cli_ctx_finalize(), but
ctx = gsec_kr->gsk_root_ctx;
if (ctx == NULL && unlikely(sec_is_reverse(sec))) {
- cfs_hlist_node_t *node;
- struct ptlrpc_cli_ctx *tmp;
+ struct hlist_node __maybe_unused *node;
+ struct ptlrpc_cli_ctx *tmp;
/* reverse ctx, search root ctx in list, choose the one
* with shortest expire time, which is most possibly have
struct ptlrpc_cli_ctx *new_ctx,
struct key *key)
{
- struct gss_sec_keyring *gsec_kr = sec2gsec_keyring(sec);
- cfs_hlist_node_t *hnode;
- struct ptlrpc_cli_ctx *ctx;
- cfs_time_t now;
- ENTRY;
+ struct gss_sec_keyring *gsec_kr = sec2gsec_keyring(sec);
+ struct hlist_node __maybe_unused *hnode;
+ struct ptlrpc_cli_ctx *ctx;
+ cfs_time_t now;
+ ENTRY;
LASSERT(sec_is_reverse(sec));
uid_t uid,
int grace, int force)
{
- struct gss_sec_keyring *gsec_kr;
- cfs_hlist_head_t freelist = CFS_HLIST_HEAD_INIT;
- cfs_hlist_node_t *pos, *next;
- struct ptlrpc_cli_ctx *ctx;
- ENTRY;
+ struct gss_sec_keyring *gsec_kr;
+ struct hlist_head freelist = CFS_HLIST_HEAD_INIT;
+ struct hlist_node __maybe_unused *pos, *next;
+ struct ptlrpc_cli_ctx *ctx;
+ ENTRY;
gsec_kr = sec2gsec_keyring(sec);
void gss_sec_gc_ctx_kr(struct ptlrpc_sec *sec)
{
struct gss_sec_keyring *gsec_kr = sec2gsec_keyring(sec);
- cfs_hlist_head_t freelist = CFS_HLIST_HEAD_INIT;
- cfs_hlist_node_t *pos, *next;
+ struct hlist_head freelist = CFS_HLIST_HEAD_INIT;
+ struct hlist_node __maybe_unused *pos, *next;
struct ptlrpc_cli_ctx *ctx;
ENTRY;
static
int gss_sec_display_kr(struct ptlrpc_sec *sec, struct seq_file *seq)
{
- struct gss_sec_keyring *gsec_kr = sec2gsec_keyring(sec);
- cfs_hlist_node_t *pos, *next;
- struct ptlrpc_cli_ctx *ctx;
- struct gss_cli_ctx *gctx;
- time_t now = cfs_time_current_sec();
- ENTRY;
+ struct gss_sec_keyring *gsec_kr = sec2gsec_keyring(sec);
+ struct hlist_node __maybe_unused *pos, *next;
+ struct ptlrpc_cli_ctx *ctx;
+ struct gss_cli_ctx *gctx;
+ time_t now = cfs_time_current_sec();
+ ENTRY;
spin_lock(&sec->ps_lock);
cfs_hlist_for_each_entry_safe(ctx, pos, next,
- &gsec_kr->gsk_clist, cc_cache) {
+ &gsec_kr->gsk_clist, cc_cache) {
struct key *key;
char flags_str[40];
char mech[40];
void gss_sec_ctx_replace_pf(struct gss_sec *gsec,
struct ptlrpc_cli_ctx *new)
{
- struct gss_sec_pipefs *gsec_pf;
- struct ptlrpc_cli_ctx *ctx;
- cfs_hlist_node_t *pos, *next;
- CFS_HLIST_HEAD(freelist);
- unsigned int hash;
- ENTRY;
+ struct hlist_node __maybe_unused *pos, *next;
+ struct gss_sec_pipefs *gsec_pf;
+ struct ptlrpc_cli_ctx *ctx;
+ HLIST_HEAD(freelist);
+ unsigned int hash;
+ ENTRY;
gsec_pf = container_of(gsec, struct gss_sec_pipefs, gsp_base);
void gss_ctx_cache_gc_pf(struct gss_sec_pipefs *gsec_pf,
cfs_hlist_head_t *freelist)
{
- struct ptlrpc_sec *sec;
- struct ptlrpc_cli_ctx *ctx;
- cfs_hlist_node_t *pos, *next;
- int i;
- ENTRY;
+ struct ptlrpc_sec *sec;
+ struct ptlrpc_cli_ctx *ctx;
+ struct hlist_node __maybe_unused *pos;
+ struct hlist_node *next;
+ int i;
+ ENTRY;
sec = &gsec_pf->gsp_base.gs_base;
struct vfs_cred *vcred,
int create, int remove_dead)
{
- struct gss_sec *gsec;
- struct gss_sec_pipefs *gsec_pf;
- struct ptlrpc_cli_ctx *ctx = NULL, *new = NULL;
- cfs_hlist_head_t *hash_head;
- cfs_hlist_node_t *pos, *next;
- CFS_HLIST_HEAD(freelist);
- unsigned int hash, gc = 0, found = 0;
+ struct gss_sec *gsec;
+ struct gss_sec_pipefs *gsec_pf;
+ struct ptlrpc_cli_ctx *ctx = NULL, *new = NULL;
+ struct hlist_head *hash_head;
+ struct hlist_node __maybe_unused *pos, *next;
+ unsigned int hash, gc = 0, found = 0;
+ HLIST_HEAD(freelist);
ENTRY;
might_sleep();
uid_t uid,
int grace, int force)
{
- struct gss_sec *gsec;
- struct gss_sec_pipefs *gsec_pf;
- struct ptlrpc_cli_ctx *ctx;
- cfs_hlist_node_t *pos, *next;
- CFS_HLIST_HEAD(freelist);
+ struct gss_sec *gsec;
+ struct gss_sec_pipefs *gsec_pf;
+ struct ptlrpc_cli_ctx *ctx;
+ struct hlist_node __maybe_unused *pos, *next;
+ HLIST_HEAD(freelist);
int i, busy = 0;
ENTRY;