Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128913
b: refs/heads/master
c: 76fcef1
h: refs/heads/master
i:
  128911: 7d03e93
v: v3
  • Loading branch information
David Woodhouse authored and Chris Mason committed Sep 25, 2008
1 parent 15f0b7f commit abe3321
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87acb4ef9b2991e1c453b78d71bce2ef994ef1ff
refs/heads/master: 76fcef19c40328499a2f6d59d76b72fd03d2cc82
34 changes: 19 additions & 15 deletions trunk/fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,21 +451,25 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags,
s->s_flags |= MS_ACTIVE;
}

mutex_lock(&s->s_root->d_inode->i_mutex);
root = lookup_one_len(subvol_name, s->s_root, strlen(subvol_name));
mutex_unlock(&s->s_root->d_inode->i_mutex);
if (IS_ERR(root)) {
up_write(&s->s_umount);
deactivate_super(s);
error = PTR_ERR(root);
goto error;
}
if (!root->d_inode) {
dput(root);
up_write(&s->s_umount);
deactivate_super(s);
error = -ENXIO;
goto error;
if (!strcmp(subvol_name, "."))
root = dget(s->s_root);
else {
mutex_lock(&s->s_root->d_inode->i_mutex);
root = lookup_one_len(subvol_name, s->s_root, strlen(subvol_name));
mutex_unlock(&s->s_root->d_inode->i_mutex);
if (IS_ERR(root)) {
up_write(&s->s_umount);
deactivate_super(s);
error = PTR_ERR(root);
goto error;
}
if (!root->d_inode) {
dput(root);
up_write(&s->s_umount);
deactivate_super(s);
error = -ENXIO;
goto error;
}
}

mnt->mnt_sb = s;
Expand Down

0 comments on commit abe3321

Please sign in to comment.