summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-03-22 21:13:53 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 18:31:16 -0400
commit35cf7ba0b46dc3582a01c3860b14bff122662aa3 (patch)
tree2b38e9333600f468f0c8371c657c02e3aa8ec43b /fs
parent79893c17b45dec0d3c25bc22d28d9f319b14f573 (diff)
downloadlinux-stable-35cf7ba0b46dc3582a01c3860b14bff122662aa3.tar.gz
linux-stable-35cf7ba0b46dc3582a01c3860b14bff122662aa3.tar.bz2
linux-stable-35cf7ba0b46dc3582a01c3860b14bff122662aa3.zip
Bury __put_super_and_need_restart()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/drop_caches.c1
-rw-r--r--fs/internal.h2
-rw-r--r--fs/quota/quota.c1
-rw-r--r--fs/super.c30
4 files changed, 6 insertions, 28 deletions
diff --git a/fs/drop_caches.c b/fs/drop_caches.c
index 42728a1f795f..52047cf4177f 100644
--- a/fs/drop_caches.c
+++ b/fs/drop_caches.c
@@ -8,6 +8,7 @@
#include <linux/writeback.h>
#include <linux/sysctl.h>
#include <linux/gfp.h>
+#include "internal.h"
/* A global variable is a bit ugly, but it keeps the code simple */
int sysctl_drop_caches;
diff --git a/fs/internal.h b/fs/internal.h
index 8a03a5447bdf..6b706bc60a66 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -87,6 +87,8 @@ extern struct file *get_empty_filp(void);
* super.c
*/
extern int do_remount_sb(struct super_block *, int, void *, int);
+extern void __put_super(struct super_block *sb);
+extern void put_super(struct super_block *sb);
/*
* open.c
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index 2196f8b07c1f..3ce1553ea7eb 100644
--- a/fs/quota/quota.c
+++ b/fs/quota/quota.c
@@ -18,6 +18,7 @@
#include <linux/quotaops.h>
#include <linux/types.h>
#include <linux/writeback.h>
+#include "../internal.h"
static int check_quotactl_permission(struct super_block *sb, int type, int cmd,
qid_t id)
diff --git a/fs/super.c b/fs/super.c
index 1f72e0d42d8f..95adbb3d8e58 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -127,40 +127,14 @@ static inline void destroy_super(struct super_block *s)
/* Superblock refcounting */
/*
- * Drop a superblock's refcount. Returns non-zero if the superblock was
- * destroyed. The caller must hold sb_lock.
+ * Drop a superblock's refcount. The caller must hold sb_lock.
*/
-int __put_super(struct super_block *sb)
+void __put_super(struct super_block *sb)
{
- int ret = 0;
-
if (!--sb->s_count) {
list_del_init(&sb->s_list);
destroy_super(sb);
- ret = 1;
- }
- return ret;
-}
-
-/*
- * Drop a superblock's refcount.
- * Returns non-zero if the superblock is about to be destroyed and
- * at least is already removed from super_blocks list, so if we are
- * making a loop through super blocks then we need to restart.
- * The caller must hold sb_lock.
- */
-int __put_super_and_need_restart(struct super_block *sb)
-{
- /* check for race with generic_shutdown_super() */
- if (list_empty(&sb->s_instances)) {
- /* super block is removed, need to restart... */
- __put_super(sb);
- return 1;
}
- /* can't be the last, since s_list is still in use */
- sb->s_count--;
- BUG_ON(sb->s_count == 0);
- return 0;
}
/**