remove incorrect comment in do_emergency_remount
[safe/jmp/linux-2.6] / fs / super.c
index f35ac60..156eae5 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/kobject.h>
 #include <linux/mutex.h>
 #include <linux/file.h>
+#include <linux/backing-dev.h>
 #include <asm/uaccess.h>
 #include "internal.h"
 
@@ -630,8 +631,6 @@ static void do_emergency_remount(struct work_struct *work)
                down_write(&sb->s_umount);
                if (sb->s_root && sb->s_bdev && !(sb->s_flags & MS_RDONLY)) {
                        /*
-                        * ->remount_fs needs lock_kernel().
-                        *
                         * What lock protects sb->s_flags??
                         */
                        do_remount_sb(sb, MS_RDONLY, NULL, 1);
@@ -693,6 +692,7 @@ int set_anon_super(struct super_block *s, void *data)
                return -EMFILE;
        }
        s->s_dev = MKDEV(0, dev & MINORMASK);
+       s->s_bdi = &noop_backing_dev_info;
        return 0;
 }
 
@@ -954,10 +954,11 @@ vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void
        if (error < 0)
                goto out_free_secdata;
        BUG_ON(!mnt->mnt_sb);
+       WARN_ON(!mnt->mnt_sb->s_bdi);
 
-       error = security_sb_kern_mount(mnt->mnt_sb, flags, secdata);
-       if (error)
-               goto out_sb;
+       error = security_sb_kern_mount(mnt->mnt_sb, flags, secdata);
+       if (error)
+               goto out_sb;
 
        /*
         * filesystems should never set s_maxbytes larger than MAX_LFS_FILESIZE