Merge git://git.infradead.org/~dwmw2/random-2.6
[pandora-kernel.git] / fs / hfs / super.c
index 32de44e..ac2ec5e 100644 (file)
@@ -297,7 +297,8 @@ static int parse_options(char *options, struct hfs_sb_info *hsb)
                                return 0;
                        }
                        p = match_strdup(&args[0]);
-                       hsb->nls_disk = load_nls(p);
+                       if (p)
+                               hsb->nls_disk = load_nls(p);
                        if (!hsb->nls_disk) {
                                printk(KERN_ERR "hfs: unable to load codepage \"%s\"\n", p);
                                kfree(p);
@@ -311,7 +312,8 @@ static int parse_options(char *options, struct hfs_sb_info *hsb)
                                return 0;
                        }
                        p = match_strdup(&args[0]);
-                       hsb->nls_io = load_nls(p);
+                       if (p)
+                               hsb->nls_io = load_nls(p);
                        if (!hsb->nls_io) {
                                printk(KERN_ERR "hfs: unable to load iocharset \"%s\"\n", p);
                                kfree(p);
@@ -370,7 +372,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
 
        sb->s_op = &hfs_super_operations;
        sb->s_flags |= MS_NODIRATIME;
-       init_MUTEX(&sbi->bitmap_lock);
+       mutex_init(&sbi->bitmap_lock);
 
        res = hfs_mdb_get(sb);
        if (res) {