Whamcloud - gitweb
LU-6142 lustre: make various 'struct file_operations' static 41/39741/2
authorMr NeilBrown <neilb@suse.de>
Thu, 27 Aug 2020 04:06:40 +0000 (14:06 +1000)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 21:25:31 +0000 (21:25 +0000)
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 <neilb@suse.de>
Change-Id: Ib6c51683c1e765db202b3f72d2accebe17191303
Reviewed-on: https://review.whamcloud.com/39741
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/lprocfs_status.h
lustre/lov/lproc_lov.c
lustre/ptlrpc/nodemap_lproc.c

index 8611349..2d23c81 100644 (file)
@@ -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,
index 204e401..1da6945 100644 (file)
@@ -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 */
 
index d3ab5fd..87feff4 100644 (file)
@@ -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,