Static analysis shows that a number of functions
could be made static. This patch declares several
functions in ec, fid, ldlm, and quota static.
Lustre-change: https://review.whamcloud.com/51476
Lustre-commit:
bcc828bdf88f8a19e56535ff3840e06065b606b2
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ic64bdf0d802fd4c963b7b7d3a654575ebde5c07d
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54615
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
struct lu_server_seq *suc_seq;
};
-void seq_update_cb(struct lu_env *env, struct thandle *th,
- struct dt_txn_commit_cb *cb, int err)
+static void seq_update_cb(struct lu_env *env, struct thandle *th,
+ struct dt_txn_commit_cb *cb, int err)
{
struct seq_update_callback *ccb;
OBD_FREE_PTR(ccb);
}
-int seq_update_cb_add(struct thandle *th, struct lu_server_seq *seq)
+static int seq_update_cb_add(struct thandle *th, struct lu_server_seq *seq)
{
struct seq_update_callback *ccb;
struct dt_txn_commit_cb *dcb;
* Adds LDLM lock \a lock to namespace LRU. Obtains necessary LRU locks
* first.
*/
-void ldlm_lock_add_to_lru(struct ldlm_lock *lock)
+static void ldlm_lock_add_to_lru(struct ldlm_lock *lock)
{
struct ldlm_namespace *ns = ldlm_lock_to_ns(lock);
*
* \retval size of the request buffer
*/
-int ldlm_request_bufsize(int count, int type)
+static int ldlm_request_bufsize(int count, int type)
{
int avail = LDLM_LOCKREQ_HANDLES;
return sizeof(struct ldlm_request) + avail;
}
-void ldlm_expired_completion_wait(struct lock_wait_data *lwd)
+static void ldlm_expired_completion_wait(struct lock_wait_data *lwd)
{
struct ldlm_lock *lock = lwd->lwd_lock;
struct obd_import *imp;
int ldlm_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)
{
/* XXX ALLOCATE - 160 bytes */
- struct lock_wait_data lwd;
+ struct lock_wait_data lwd = {
+ .lwd_lock = NULL,
+ .lwd_conn_cnt = 0
+ };
struct obd_device *obd;
struct obd_import *imp = NULL;
timeout_t timeout;
1 + min_t(u32, cli->cl_max_rpcs_in_flight, 8);
}
-int __ldlm_replay_locks(struct obd_import *imp, bool rate_limit)
+static int __ldlm_replay_locks(struct obd_import *imp, bool rate_limit)
{
struct ldlm_namespace *ns = imp->imp_obd->obd_namespace;
LIST_HEAD(list);
lprocfs_free_stats(&ns->ns_stats);
}
-void ldlm_namespace_sysfs_unregister(struct ldlm_namespace *ns)
+static void ldlm_namespace_sysfs_unregister(struct ldlm_namespace *ns)
{
kobject_put(&ns->ns_kobj);
wait_for_completion(&ns->ns_kobj_unregister);
}
-int ldlm_namespace_sysfs_register(struct ldlm_namespace *ns)
+static int ldlm_namespace_sysfs_register(struct ldlm_namespace *ns)
{
int err;
RETURN(0);
}
-void qmt_setup_id_desc(struct ldlm_lock *lock, union ldlm_gl_desc *desc,
- struct lquota_entry *lqe)
+static void qmt_setup_id_desc(struct ldlm_lock *lock, union ldlm_gl_desc *desc,
+ struct lquota_entry *lqe)
{
struct obd_uuid *uuid = &(lock)->l_export->exp_client_uuid;
int idx, stype;