Bury __put_super_and_need_restart()
[linux-2.6-block.git] / fs / super.c
index 1f72e0d42d8fea7d77b1bb1c0f11b396eb6de1d5..95adbb3d8e581e2e8755e4601554a3dfe8ce10ef 100644 (file)
@@ -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;
 }
 
 /**