From: Mr NeilBrown Date: Tue, 11 May 2021 03:47:57 +0000 (-0700) Subject: LU-6142 lustre: make various 'struct file_operations' static X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=ccb38889cad2f6371eb22514c993b3edcbe36771;p=fs%2Flustre-release.git 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. Lustre-change: https://review.whamcloud.com/39741 Lustre-commit: 950200a21fb0636c53eefc9b6337bf1d10ad121e Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: Ib6c51683c1e765db202b3f72d2accebe17191303 Reviewed-by: James Simmons Reviewed-by: Shaun Tancheff Reviewed-by: Andreas Dilger Reviewed-on: https://review.whamcloud.com/43638 Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h index 55af6cd..de5773a 100644 --- a/lustre/include/lprocfs_status.h +++ b/lustre/include/lprocfs_status.h @@ -540,9 +540,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,