From 91a5a1205b83fb61f3d049e78185a268576cc172 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 10 Jan 2012 17:48:52 -0500 Subject: [PATCH] --- yaml --- r: 283220 b: refs/heads/master c: b3f2a92447b8443360ac117a3d7c06689562a70c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/hfsplus/super.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index bbb1f087d697..dbc6742dbc0c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ace8577aeb438025ecf642f5eda3aa551d251951 +refs/heads/master: b3f2a92447b8443360ac117a3d7c06689562a70c diff --git a/trunk/fs/hfsplus/super.c b/trunk/fs/hfsplus/super.c index edf0a801446b..427682ca9e48 100644 --- a/trunk/fs/hfsplus/super.c +++ b/trunk/fs/hfsplus/super.c @@ -499,9 +499,16 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) if (!sbi->hidden_dir) { mutex_lock(&sbi->vh_mutex); sbi->hidden_dir = hfsplus_new_inode(sb, S_IFDIR); - hfsplus_create_cat(sbi->hidden_dir->i_ino, root, &str, - sbi->hidden_dir); + if (!sbi->hidden_dir) { + mutex_unlock(&sbi->vh_mutex); + err = -ENOMEM; + goto out_put_root; + } + err = hfsplus_create_cat(sbi->hidden_dir->i_ino, root, + &str, sbi->hidden_dir); mutex_unlock(&sbi->vh_mutex); + if (err) + goto out_put_hidden_dir; hfsplus_mark_inode_dirty(sbi->hidden_dir, HFSPLUS_I_CAT_DIRTY);