diff mbox series

[14/27] lustre: osc: convert more functions to static

Message ID 20250321130711.3257092-15-jsimmons@infradead.org (mailing list archive)
State New
Headers show
Series lustre: sync to OpenSFS tree July 27, 2023 | expand

Commit Message

James Simmons March 21, 2025, 1:06 p.m. UTC
From: Timothy Day <timday@amazon.com>

Static analysis shows that a number of functions
could be made static. This patch declares several
functions in osc as static.

Also, fix a few minor style issues.

WC-bug-id: https://jira.whamcloud.com/browse/LU-8191
Lustre-commit: 2fa075d10f72f1400 ("U-8191 lustre: convert osp,osd,osc,ofd functions to static")
Signed-off-by: Timothy Day <timday@amazon.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51477
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/osc/lproc_osc.c   |  9 +++------
 fs/lustre/osc/osc_io.c      |  4 ++--
 fs/lustre/osc/osc_request.c | 14 ++++++++------
 3 files changed, 13 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/fs/lustre/osc/lproc_osc.c b/fs/lustre/osc/lproc_osc.c
index d3131ee7eef1..2e2cec9db148 100644
--- a/fs/lustre/osc/lproc_osc.c
+++ b/fs/lustre/osc/lproc_osc.c
@@ -840,7 +840,7 @@  static ssize_t osc_stats_seq_write(struct file *file,
 
 LDEBUGFS_SEQ_FOPS(osc_stats);
 
-void lproc_osc_attach_seqstat(struct obd_device *obd)
+static void ldebugfs_osc_attach_seqstat(struct obd_device *obd)
 {
 	debugfs_create_file("osc_stats", 0644, obd->obd_debugfs_entry, obd,
 			    &osc_stats_fops);
@@ -884,17 +884,14 @@  int osc_tunables_init(struct obd_device *obd)
 	if (rc)
 		return rc;
 
+	ldebugfs_osc_attach_seqstat(obd);
+
 	rc = sptlrpc_lprocfs_cliobd_attach(obd);
 	if (rc) {
 		lprocfs_obd_cleanup(obd);
 		return rc;
 	}
 
-	debugfs_create_file("osc_stats", 0644, obd->obd_debugfs_entry, obd,
-			    &osc_stats_fops);
-	debugfs_create_file("rpc_stats", 0644, obd->obd_debugfs_entry, obd,
-			    &osc_rpc_stats_fops);
-
 	ptlrpc_lprocfs_register_obd(obd);
 	return 0;
 }
diff --git a/fs/lustre/osc/osc_io.c b/fs/lustre/osc/osc_io.c
index 900edf8b9a41..5b4abb1cb625 100644
--- a/fs/lustre/osc/osc_io.c
+++ b/fs/lustre/osc/osc_io.c
@@ -937,8 +937,8 @@  int osc_fsync_ost(const struct lu_env *env, struct osc_object *obj,
 }
 EXPORT_SYMBOL(osc_fsync_ost);
 
-int osc_io_fsync_start(const struct lu_env *env,
-		       const struct cl_io_slice *slice)
+static int osc_io_fsync_start(const struct lu_env *env,
+			      const struct cl_io_slice *slice)
 {
 	struct cl_io *io = slice->cis_io;
 	struct cl_fsync_io *fio = &io->u.ci_fsync;
diff --git a/fs/lustre/osc/osc_request.c b/fs/lustre/osc/osc_request.c
index 5c9f93b91609..4a739b1858e5 100644
--- a/fs/lustre/osc/osc_request.c
+++ b/fs/lustre/osc/osc_request.c
@@ -2927,10 +2927,11 @@  static int osc_set_lock_data(struct ldlm_lock *lock, void *data)
 	return set;
 }
 
-int osc_enqueue_fini(struct ptlrpc_request *req, osc_enqueue_upcall_f upcall,
-		     void *cookie, struct lustre_handle *lockh,
-		     enum ldlm_mode mode, u64 *flags, int speculative,
-		     int errcode)
+static int osc_enqueue_fini(struct ptlrpc_request *req,
+			    osc_enqueue_upcall_f upcall,
+			    void *cookie, struct lustre_handle *lockh,
+			    enum ldlm_mode mode, u64 *flags,
+			    int speculative, int errcode)
 {
 	bool intent = *flags & LDLM_FL_HAS_INTENT;
 	int rc;
@@ -2962,8 +2963,9 @@  int osc_enqueue_fini(struct ptlrpc_request *req, osc_enqueue_upcall_f upcall,
 	return rc;
 }
 
-int osc_enqueue_interpret(const struct lu_env *env, struct ptlrpc_request *req,
-			  void *args, int rc)
+static int osc_enqueue_interpret(const struct lu_env *env,
+				 struct ptlrpc_request *req,
+				 void *args, int rc)
 {
 	struct osc_enqueue_args *aa = args;
 	struct ldlm_lock *lock;