nfsd: fix b0rken error value for setattr on read-only mount
[pandora-kernel.git] / fs / binfmt_misc.c
index a9198df..613aa06 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/sched.h>
+#include <linux/magic.h>
 #include <linux/binfmts.h>
 #include <linux/slab.h>
 #include <linux/ctype.h>
@@ -699,7 +700,7 @@ static int bm_fill_super(struct super_block * sb, void * data, int silent)
                [3] = {"register", &bm_register_operations, S_IWUSR},
                /* last one */ {""}
        };
-       int err = simple_fill_super(sb, 0x42494e4d, bm_files);
+       int err = simple_fill_super(sb, BINFMTFS_MAGIC, bm_files);
        if (!err)
                sb->s_op = &s_ops;
        return err;
@@ -726,11 +727,8 @@ static struct file_system_type bm_fs_type = {
 static int __init init_misc_binfmt(void)
 {
        int err = register_filesystem(&bm_fs_type);
-       if (!err) {
-               err = insert_binfmt(&misc_format);
-               if (err)
-                       unregister_filesystem(&bm_fs_type);
-       }
+       if (!err)
+               insert_binfmt(&misc_format);
        return err;
 }