Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-3963 obdclass: convert to linux list api
[fs/lustre-release.git]
/
lustre
/
include
/
lustre_capa.h
diff --git
a/lustre/include/lustre_capa.h
b/lustre/include/lustre_capa.h
index
b83cd6f
..
ac713d0
100644
(file)
--- a/
lustre/include/lustre_capa.h
+++ b/
lustre/include/lustre_capa.h
@@
-71,16
+71,16
@@
struct capa_hmac_alg {
}
struct client_capa {
}
struct client_capa {
-
struct inode
*inode;
-
cfs_list_t lli_list;
/* link to lli_oss_capas */
+
struct inode
*inode;
+
struct list_head lli_list;
/* link to lli_oss_capas */
};
struct target_capa {
};
struct target_capa {
-
cfs_hlist_node_t c_hash;
/* link to capa hash */
+
struct hlist_node c_hash;
/* link to capa hash */
};
struct obd_capa {
};
struct obd_capa {
-
cfs_list_t
c_list; /* link to capa_list */
+
struct list_head
c_list; /* link to capa_list */
struct lustre_capa c_capa; /* capa */
atomic_t c_refc; /* ref count */
struct lustre_capa c_capa; /* capa */
atomic_t c_refc; /* ref count */
@@
-176,17
+176,17
@@
CDEBUG(level, fmt " capability key@%p seq "LPU64" keyid %u\n", \
typedef int (* renew_capa_cb_t)(struct obd_capa *, struct lustre_capa *);
/* obdclass/capa.c */
typedef int (* renew_capa_cb_t)(struct obd_capa *, struct lustre_capa *);
/* obdclass/capa.c */
-extern
cfs_list_t
capa_list[];
+extern
struct list_head
capa_list[];
extern spinlock_t capa_lock;
extern int capa_count[];
extern struct kmem_cache *capa_cachep;
extern spinlock_t capa_lock;
extern int capa_count[];
extern struct kmem_cache *capa_cachep;
-
cfs_hlist_head_t
*init_capa_hash(void);
-void cleanup_capa_hash(
cfs_hlist_head_t
*hash);
+
struct hlist_head
*init_capa_hash(void);
+void cleanup_capa_hash(
struct hlist_head
*hash);
-struct obd_capa *capa_add(
cfs_hlist_head_t
*hash,
+struct obd_capa *capa_add(
struct hlist_head
*hash,
struct lustre_capa *capa);
struct lustre_capa *capa);
-struct obd_capa *capa_lookup(
cfs_hlist_head_t
*hash,
+struct obd_capa *capa_lookup(
struct hlist_head
*hash,
struct lustre_capa *capa, int alive);
int capa_hmac(__u8 *hmac, struct lustre_capa *capa, __u8 *key);
struct lustre_capa *capa, int alive);
int capa_hmac(__u8 *hmac, struct lustre_capa *capa, __u8 *key);
@@
-205,18
+205,18
@@
static inline struct obd_capa *alloc_capa(int site)
if (unlikely(!ocapa))
return ERR_PTR(-ENOMEM);
if (unlikely(!ocapa))
return ERR_PTR(-ENOMEM);
-
CFS_
INIT_LIST_HEAD(&ocapa->c_list);
+ INIT_LIST_HEAD(&ocapa->c_list);
atomic_set(&ocapa->c_refc, 1);
spin_lock_init(&ocapa->c_lock);
ocapa->c_site = site;
atomic_set(&ocapa->c_refc, 1);
spin_lock_init(&ocapa->c_lock);
ocapa->c_site = site;
-
if (ocapa->c_site == CAPA_SITE_CLIENT)
-
CFS_
INIT_LIST_HEAD(&ocapa->u.cli.lli_list);
-
else
-
CFS_
INIT_HLIST_NODE(&ocapa->u.tgt.c_hash);
+ if (ocapa->c_site == CAPA_SITE_CLIENT)
+ INIT_LIST_HEAD(&ocapa->u.cli.lli_list);
+ else
+ INIT_HLIST_NODE(&ocapa->u.tgt.c_hash);
-
return ocapa;
+ return ocapa;
#else
#else
-
return ERR_PTR(-EOPNOTSUPP);
+ return ERR_PTR(-EOPNOTSUPP);
#endif
}
#endif
}
@@
-240,11
+240,11
@@
static inline void capa_put(struct obd_capa *ocapa)
}
if (atomic_dec_and_test(&ocapa->c_refc)) {
}
if (atomic_dec_and_test(&ocapa->c_refc)) {
- LASSERT(
cfs_
list_empty(&ocapa->c_list));
+ LASSERT(list_empty(&ocapa->c_list));
if (ocapa->c_site == CAPA_SITE_CLIENT) {
if (ocapa->c_site == CAPA_SITE_CLIENT) {
- LASSERT(
cfs_
list_empty(&ocapa->u.cli.lli_list));
+ LASSERT(list_empty(&ocapa->u.cli.lli_list));
} else {
} else {
-
cfs_hlist_node_t
*hnode;
+
struct hlist_node
*hnode;
hnode = &ocapa->u.tgt.c_hash;
LASSERT(!hnode->next && !hnode->pprev);
hnode = &ocapa->u.tgt.c_hash;
LASSERT(!hnode->next && !hnode->pprev);
@@
-294,8
+294,8
@@
static inline int capa_opc_supported(struct lustre_capa *capa, __u64 opc)
}
struct filter_capa_key {
}
struct filter_capa_key {
-
cfs_list_t
k_list;
-
struct lustre_capa_key k_key;
+
struct list_head
k_list;
+ struct lustre_capa_key k_key;
};
enum lc_auth_id {
};
enum lc_auth_id {