orangefs: make fs_mount_pending static
authorMartin Brandenburg <martin@omnibond.com>
Sat, 5 Mar 2016 18:17:39 +0000 (13:17 -0500)
committerMike Marshall <hubcap@omnibond.com>
Wed, 9 Mar 2016 18:26:39 +0000 (13:26 -0500)
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/devorangefs-req.c
fs/orangefs/orangefs-kernel.h

index 0f9a12ac74588b06b71c8fc5cc54b9be76130ec1..12ea8730aa5d9ab942f168f6b94a3df677eb4582 100644 (file)
@@ -74,6 +74,44 @@ static struct orangefs_kernel_op_s *orangefs_devreq_remove_op(__u64 tag)
        return NULL;
 }
 
+/* Returns whether any FS are still pending remounted */
+static int mark_all_pending_mounts(void)
+{
+       int unmounted = 1;
+       struct orangefs_sb_info_s *orangefs_sb = NULL;
+
+       spin_lock(&orangefs_superblocks_lock);
+       list_for_each_entry(orangefs_sb, &orangefs_superblocks, list) {
+               /* All of these file system require a remount */
+               orangefs_sb->mount_pending = 1;
+               unmounted = 0;
+       }
+       spin_unlock(&orangefs_superblocks_lock);
+       return unmounted;
+}
+
+/*
+ * Determine if a given file system needs to be remounted or not
+ *  Returns -1 on error
+ *           0 if already mounted
+ *           1 if needs remount
+ */
+static int fs_mount_pending(__s32 fsid)
+{
+       int mount_pending = -1;
+       struct orangefs_sb_info_s *orangefs_sb = NULL;
+
+       spin_lock(&orangefs_superblocks_lock);
+       list_for_each_entry(orangefs_sb, &orangefs_superblocks, list) {
+               if (orangefs_sb->fs_id == fsid) {
+                       mount_pending = orangefs_sb->mount_pending;
+                       break;
+               }
+       }
+       spin_unlock(&orangefs_superblocks_lock);
+       return mount_pending;
+}
+
 static int orangefs_devreq_open(struct inode *inode, struct file *file)
 {
        int ret = -EINVAL;
@@ -449,44 +487,6 @@ Enomem:
        goto wakeup;
 }
 
-/* Returns whether any FS are still pending remounted */
-static int mark_all_pending_mounts(void)
-{
-       int unmounted = 1;
-       struct orangefs_sb_info_s *orangefs_sb = NULL;
-
-       spin_lock(&orangefs_superblocks_lock);
-       list_for_each_entry(orangefs_sb, &orangefs_superblocks, list) {
-               /* All of these file system require a remount */
-               orangefs_sb->mount_pending = 1;
-               unmounted = 0;
-       }
-       spin_unlock(&orangefs_superblocks_lock);
-       return unmounted;
-}
-
-/*
- * Determine if a given file system needs to be remounted or not
- *  Returns -1 on error
- *           0 if already mounted
- *           1 if needs remount
- */
-int fs_mount_pending(__s32 fsid)
-{
-       int mount_pending = -1;
-       struct orangefs_sb_info_s *orangefs_sb = NULL;
-
-       spin_lock(&orangefs_superblocks_lock);
-       list_for_each_entry(orangefs_sb, &orangefs_superblocks, list) {
-               if (orangefs_sb->fs_id == fsid) {
-                       mount_pending = orangefs_sb->mount_pending;
-                       break;
-               }
-       }
-       spin_unlock(&orangefs_superblocks_lock);
-       return mount_pending;
-}
-
 /*
  * NOTE: gets called when the last reference to this device is dropped.
  * Using the open_access_count variable, we enforce a reference count
index c045c0b8950759f19edef3f0a7dd7a4eee88e550..045e493ab033974e54919d01900e261896b90fed 100644 (file)
@@ -523,7 +523,6 @@ int orangefs_dev_init(void);
 void orangefs_dev_cleanup(void);
 int is_daemon_in_service(void);
 bool __is_daemon_in_service(void);
-int fs_mount_pending(__s32 fsid);
 
 /*
  * defined in orangefs-utils.c