]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/sysv/super.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / fs / sysv / super.c
index 3d9c62be0c10ebc051d64951836ba366a3586018..f60c196913eafe77c941a0fd416d1a719e2e5049 100644 (file)
@@ -332,6 +332,10 @@ static int complete_read_super(struct super_block *sb, int silent, int size)
        sb->s_magic = SYSV_MAGIC_BASE + sbi->s_type;
        /* set up enough so that it can read an inode */
        sb->s_op = &sysv_sops;
+       if (sbi->s_forced_ro)
+               sb->s_flags |= MS_RDONLY;
+       if (sbi->s_truncate)
+               sb->s_d_op = &sysv_dentry_operations;
        root_inode = sysv_iget(sb, SYSV_ROOT_INO);
        if (IS_ERR(root_inode)) {
                printk("SysV FS: get root inode failed\n");
@@ -343,10 +347,6 @@ static int complete_read_super(struct super_block *sb, int silent, int size)
                printk("SysV FS: get root dentry failed\n");
                return 0;
        }
-       if (sbi->s_forced_ro)
-               sb->s_flags |= MS_RDONLY;
-       if (sbi->s_truncate)
-               sb->s_root->d_op = &sysv_dentry_operations;
        return 1;
 }