From 950200a21fb0636c53eefc9b6337bf1d10ad121e Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Thu, 27 Aug 2020 14:06:40 +1000 Subject: [PATCH] LU-6142 lustre: make various 'struct file_operations' static These 'struct file_operations' are only used locally, so make them static. Except lprocfs_evict_client_fops() which isn't used at all and doesn't exist, so discard the declaration. Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: Ib6c51683c1e765db202b3f72d2accebe17191303 Reviewed-on: https://review.whamcloud.com/39741 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Shaun Tancheff Reviewed-by: Andreas Dilger --- lustre/include/lprocfs_status.h | 3 --- lustre/lov/lproc_lov.c | 12 ++++++------ lustre/ptlrpc/nodemap_lproc.c | 6 +++--- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h index 8611349..2d23c81 100644 --- a/lustre/include/lprocfs_status.h +++ b/lustre/include/lprocfs_status.h @@ -556,9 +556,6 @@ extern void lprocfs_remove_proc_entry(const char *name, struct proc_dir_entry *parent); extern int lprocfs_obd_setup(struct obd_device *obd, bool uuid_only); extern int lprocfs_obd_cleanup(struct obd_device *obd); -#ifdef HAVE_SERVER_SUPPORT -extern const struct file_operations lprocfs_evict_client_fops; -#endif extern int lprocfs_seq_create(struct proc_dir_entry *parent, const char *name, mode_t mode, diff --git a/lustre/lov/lproc_lov.c b/lustre/lov/lproc_lov.c index 204e401..1da6945 100644 --- a/lustre/lov/lproc_lov.c +++ b/lustre/lov/lproc_lov.c @@ -277,12 +277,12 @@ struct lprocfs_vars lprocfs_lov_obd_vars[] = { { NULL } }; -const struct file_operations lov_proc_target_fops = { - .owner = THIS_MODULE, - .open = lov_target_seq_open, - .read = seq_read, - .llseek = seq_lseek, - .release = lprocfs_seq_release, +static const struct file_operations lov_proc_target_fops = { + .owner = THIS_MODULE, + .open = lov_target_seq_open, + .read = seq_read, + .llseek = seq_lseek, + .release = lprocfs_seq_release, }; #endif /* CONFIG_PROC_FS */ diff --git a/lustre/ptlrpc/nodemap_lproc.c b/lustre/ptlrpc/nodemap_lproc.c index d3ab5fd..87feff4 100644 --- a/lustre/ptlrpc/nodemap_lproc.c +++ b/lustre/ptlrpc/nodemap_lproc.c @@ -684,21 +684,21 @@ LPROC_SEQ_FOPS_RO(nodemap_map_mode); LPROC_SEQ_FOPS_RO(nodemap_audit_mode); LPROC_SEQ_FOPS_RO(nodemap_forbid_encryption); -const struct file_operations nodemap_ranges_fops = { +static const struct file_operations nodemap_ranges_fops = { .open = nodemap_ranges_open, .read = seq_read, .llseek = seq_lseek, .release = single_release }; -const struct file_operations nodemap_idmap_fops = { +static const struct file_operations nodemap_idmap_fops = { .open = nodemap_idmap_open, .read = seq_read, .llseek = seq_lseek, .release = single_release }; -const struct file_operations nodemap_exports_fops = { +static const struct file_operations nodemap_exports_fops = { .open = nodemap_exports_open, .read = seq_read, .llseek = seq_lseek, -- 1.8.3.1