diff options
author | Martin Brandenburg <martin@omnibond.com> | 2016-03-05 13:17:39 -0500 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2016-03-09 13:26:39 -0500 |
commit | acfcbaf1925f2dc5c46c61de69d756dec92a2ff8 (patch) | |
tree | d5b70201feb5d7e2ab640435703285405f9f1808 | |
parent | c62da5853de5564e367932185500f96ab70a6f7c (diff) | |
download | blackbird-obmc-linux-acfcbaf1925f2dc5c46c61de69d756dec92a2ff8.tar.gz blackbird-obmc-linux-acfcbaf1925f2dc5c46c61de69d756dec92a2ff8.zip |
orangefs: make fs_mount_pending static
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
-rw-r--r-- | fs/orangefs/devorangefs-req.c | 76 | ||||
-rw-r--r-- | fs/orangefs/orangefs-kernel.h | 1 |
2 files changed, 38 insertions, 39 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 diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h index c045c0b89507..045e493ab033 100644 --- a/fs/orangefs/orangefs-kernel.h +++ b/fs/orangefs/orangefs-kernel.h @@ -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 |