summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/devorangefs-req.c
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2016-03-05 13:17:39 -0500
committerMike Marshall <hubcap@omnibond.com>2016-03-09 13:26:39 -0500
commitacfcbaf1925f2dc5c46c61de69d756dec92a2ff8 (patch)
treed5b70201feb5d7e2ab640435703285405f9f1808 /fs/orangefs/devorangefs-req.c
parentc62da5853de5564e367932185500f96ab70a6f7c (diff)
downloadlinux-acfcbaf1925f2dc5c46c61de69d756dec92a2ff8.tar.bz2
orangefs: make fs_mount_pending static
Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/devorangefs-req.c')
-rw-r--r--fs/orangefs/devorangefs-req.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c
index 0f9a12ac7458..12ea8730aa5d 100644
--- a/fs/orangefs/devorangefs-req.c
+++ b/fs/orangefs/devorangefs-req.c
@@ -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