]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
orangefs: make several *_operations structs static
authorMartin Brandenburg <martin@omnibond.com>
Tue, 3 Apr 2018 16:27:13 +0000 (16:27 +0000)
committerMike Marshall <hubcap@omnibond.com>
Wed, 4 Apr 2018 01:55:27 +0000 (21:55 -0400)
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/devorangefs-req.c
fs/orangefs/inode.c
fs/orangefs/orangefs-kernel.h

index 319cf9dcacddae1b910bd119c3222459a052b319..66369ec900201e3f4fd458e965f4719cbd747a09 100644 (file)
@@ -778,9 +778,35 @@ static long orangefs_devreq_compat_ioctl(struct file *filp, unsigned int cmd,
 
 #endif /* CONFIG_COMPAT is in .config */
 
+static __poll_t orangefs_devreq_poll(struct file *file,
+                                     struct poll_table_struct *poll_table)
+{
+       __poll_t poll_revent_mask = 0;
+
+       poll_wait(file, &orangefs_request_list_waitq, poll_table);
+
+       if (!list_empty(&orangefs_request_list))
+               poll_revent_mask |= EPOLLIN;
+       return poll_revent_mask;
+}
+
 /* the assigned character device major number */
 static int orangefs_dev_major;
 
+static const struct file_operations orangefs_devreq_file_operations = {
+       .owner = THIS_MODULE,
+       .read = orangefs_devreq_read,
+       .write_iter = orangefs_devreq_write_iter,
+       .open = orangefs_devreq_open,
+       .release = orangefs_devreq_release,
+       .unlocked_ioctl = orangefs_devreq_ioctl,
+
+#ifdef CONFIG_COMPAT           /* CONFIG_COMPAT is in .config */
+       .compat_ioctl = orangefs_devreq_compat_ioctl,
+#endif
+       .poll = orangefs_devreq_poll
+};
+
 /*
  * Initialize orangefs device specific state:
  * Must be called at module load time only
@@ -813,29 +839,3 @@ void orangefs_dev_cleanup(void)
                     "*** /dev/%s character device unregistered ***\n",
                     ORANGEFS_REQDEVICE_NAME);
 }
-
-static __poll_t orangefs_devreq_poll(struct file *file,
-                                     struct poll_table_struct *poll_table)
-{
-       __poll_t poll_revent_mask = 0;
-
-       poll_wait(file, &orangefs_request_list_waitq, poll_table);
-
-       if (!list_empty(&orangefs_request_list))
-               poll_revent_mask |= EPOLLIN;
-       return poll_revent_mask;
-}
-
-const struct file_operations orangefs_devreq_file_operations = {
-       .owner = THIS_MODULE,
-       .read = orangefs_devreq_read,
-       .write_iter = orangefs_devreq_write_iter,
-       .open = orangefs_devreq_open,
-       .release = orangefs_devreq_release,
-       .unlocked_ioctl = orangefs_devreq_ioctl,
-
-#ifdef CONFIG_COMPAT           /* CONFIG_COMPAT is in .config */
-       .compat_ioctl = orangefs_devreq_compat_ioctl,
-#endif
-       .poll = orangefs_devreq_poll
-};
index fe1d705ad91fac90c8d496a1c78611e42da9d1d1..79c61da8b1bc800d6e889689a2ba072462f6576b 100644 (file)
@@ -138,7 +138,7 @@ static ssize_t orangefs_direct_IO(struct kiocb *iocb,
 }
 
 /** ORANGEFS2 implementation of address space operations */
-const struct address_space_operations orangefs_address_operations = {
+static const struct address_space_operations orangefs_address_operations = {
        .readpage = orangefs_readpage,
        .readpages = orangefs_readpages,
        .invalidatepage = orangefs_invalidatepage,
@@ -307,7 +307,7 @@ int orangefs_update_time(struct inode *inode, struct timespec *time, int flags)
 }
 
 /* ORANGEDS2 implementation of VFS inode operations for files */
-const struct inode_operations orangefs_file_inode_operations = {
+static const struct inode_operations orangefs_file_inode_operations = {
        .get_acl = orangefs_get_acl,
        .set_acl = orangefs_set_acl,
        .setattr = orangefs_setattr,
index eebbaece85ef735b231dbe835bc414669e204749..f49d53de89010cdc41a2d5077bed961b9a6ed2d6 100644 (file)
@@ -487,14 +487,11 @@ extern struct list_head *orangefs_htable_ops_in_progress;
 extern spinlock_t orangefs_htable_ops_in_progress_lock;
 extern int hash_table_size;
 
-extern const struct address_space_operations orangefs_address_operations;
-extern const struct inode_operations orangefs_file_inode_operations;
 extern const struct file_operations orangefs_file_operations;
 extern const struct inode_operations orangefs_symlink_inode_operations;
 extern const struct inode_operations orangefs_dir_inode_operations;
 extern const struct file_operations orangefs_dir_operations;
 extern const struct dentry_operations orangefs_dentry_operations;
-extern const struct file_operations orangefs_devreq_file_operations;
 
 extern wait_queue_head_t orangefs_bufmap_init_waitq;