Commit b3f2a924 authored by Al Viro's avatar Al Viro

hfsplus: creation of hidden dir on mount can fail

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ace8577a
...@@ -499,9 +499,16 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) ...@@ -499,9 +499,16 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
if (!sbi->hidden_dir) { if (!sbi->hidden_dir) {
mutex_lock(&sbi->vh_mutex); mutex_lock(&sbi->vh_mutex);
sbi->hidden_dir = hfsplus_new_inode(sb, S_IFDIR); sbi->hidden_dir = hfsplus_new_inode(sb, S_IFDIR);
hfsplus_create_cat(sbi->hidden_dir->i_ino, root, &str, if (!sbi->hidden_dir) {
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); mutex_unlock(&sbi->vh_mutex);
if (err)
goto out_put_hidden_dir;
hfsplus_mark_inode_dirty(sbi->hidden_dir, hfsplus_mark_inode_dirty(sbi->hidden_dir,
HFSPLUS_I_CAT_DIRTY); HFSPLUS_I_CAT_DIRTY);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment