aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-01-10 17:48:52 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-10 17:48:52 -0500
commitb3f2a92447b8443360ac117a3d7c06689562a70c (patch)
treec30e40122be3140aeabdb27bb9960fbb9ed2e730 /fs/hfsplus/super.c
parentace8577aeb438025ecf642f5eda3aa551d251951 (diff)
hfsplus: creation of hidden dir on mount can fail
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hfsplus/super.c')
-rw-r--r--fs/hfsplus/super.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index edf0a801446b..427682ca9e48 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -499,9 +499,16 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
499 if (!sbi->hidden_dir) { 499 if (!sbi->hidden_dir) {
500 mutex_lock(&sbi->vh_mutex); 500 mutex_lock(&sbi->vh_mutex);
501 sbi->hidden_dir = hfsplus_new_inode(sb, S_IFDIR); 501 sbi->hidden_dir = hfsplus_new_inode(sb, S_IFDIR);
502 hfsplus_create_cat(sbi->hidden_dir->i_ino, root, &str, 502 if (!sbi->hidden_dir) {
503 sbi->hidden_dir); 503 mutex_unlock(&sbi->vh_mutex);
504 err = -ENOMEM;
505 goto out_put_root;
506 }
507 err = hfsplus_create_cat(sbi->hidden_dir->i_ino, root,
508 &str, sbi->hidden_dir);
504 mutex_unlock(&sbi->vh_mutex); 509 mutex_unlock(&sbi->vh_mutex);
510 if (err)
511 goto out_put_hidden_dir;
505 512
506 hfsplus_mark_inode_dirty(sbi->hidden_dir, 513 hfsplus_mark_inode_dirty(sbi->hidden_dir,
507 HFSPLUS_I_CAT_DIRTY); 514 HFSPLUS_I_CAT_DIRTY);