[PATCH] autofs: fix error code path in autofs_fill_sb()
[powerpc.git] / fs / autofs4 / inode.c
index ce7c0f1..9c48250 100644 (file)
@@ -152,10 +152,11 @@ void autofs4_kill_sb(struct super_block *sb)
        /*
         * In the event of a failure in get_sb_nodev the superblock
         * info is not present so nothing else has been setup, so
-        * just exit when we are called from deactivate_super.
+        * just call kill_anon_super when we are called from
+        * deactivate_super.
         */
        if (!sbi)
-               return;
+               goto out_kill_sb;
 
        sb->s_fs_info = NULL;
 
@@ -167,6 +168,7 @@ void autofs4_kill_sb(struct super_block *sb)
 
        kfree(sbi);
 
+out_kill_sb:
        DPRINTK("shutting down");
        kill_anon_super(sb);
 }
@@ -426,7 +428,6 @@ fail_ino:
 fail_free:
        kfree(sbi);
        s->s_fs_info = NULL;
-       kill_anon_super(s);
 fail_unlock:
        return -EINVAL;
 }