extern struct list_head ldlm_srv_namespace_list;
extern struct mutex ldlm_cli_namespace_lock;
extern struct list_head ldlm_cli_active_namespace_list;
-extern struct list_head ldlm_cli_inactive_namespace_list;
static inline int ldlm_namespace_nr_read(ldlm_side_t client)
{
&ldlm_srv_namespace_list : &ldlm_cli_active_namespace_list;
}
-static inline struct list_head *ldlm_namespace_inactive_list(ldlm_side_t client)
-{
- return client == LDLM_NAMESPACE_SERVER ?
- &ldlm_srv_namespace_list : &ldlm_cli_inactive_namespace_list;
-}
-
static inline struct mutex *ldlm_namespace_lock(ldlm_side_t client)
{
return client == LDLM_NAMESPACE_SERVER ?
* inactive list */
LIST_HEAD(ldlm_cli_active_namespace_list);
/* Client namespaces that don't have any locks in them */
-LIST_HEAD(ldlm_cli_inactive_namespace_list);
+static LIST_HEAD(ldlm_cli_inactive_namespace_list);
static struct dentry *ldlm_debugfs_dir;
static struct dentry *ldlm_ns_debugfs_dir;
{
mutex_lock(ldlm_namespace_lock(client));
LASSERT(list_empty(&ns->ns_list_chain));
- list_add(&ns->ns_list_chain, ldlm_namespace_inactive_list(client));
+ list_add(&ns->ns_list_chain, &ldlm_cli_inactive_namespace_list);
ldlm_namespace_nr_inc(client);
mutex_unlock(ldlm_namespace_lock(client));
}
{
LASSERT(!list_empty(&ns->ns_list_chain));
LASSERT(mutex_is_locked(ldlm_namespace_lock(client)));
- list_move_tail(&ns->ns_list_chain,
- ldlm_namespace_inactive_list(client));
+ list_move_tail(&ns->ns_list_chain, &ldlm_cli_inactive_namespace_list);
}
/** Should be called with ldlm_namespace_lock(client) taken. */