Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274603
b: refs/heads/master
c: ba5b895
h: refs/heads/master
i:
  274601: 7b26aaa
  274599: e419719
v: v3
  • Loading branch information
Josef Bacik committed Oct 19, 2011
1 parent ca2f269 commit 3cc4c6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 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: 0cbbdf7c9c46467bfb7129c30236f36a679ab244
refs/heads/master: ba5b8958dabbd7890a6929af1ffc0d87187765dc
25 changes: 1 addition & 24 deletions trunk/fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ static struct dentry *get_default_root(struct super_block *sb,
struct btrfs_path *path;
struct btrfs_key location;
struct inode *inode;
struct dentry *dentry;
u64 dir_id;
int new = 0;

Expand Down Expand Up @@ -566,29 +565,7 @@ static struct dentry *get_default_root(struct super_block *sb,
return dget(sb->s_root);
}

if (new) {
const struct qstr name = { .name = "/", .len = 1 };

/*
* New inode, we need to make the dentry a sibling of s_root so
* everything gets cleaned up properly on unmount.
*/
dentry = d_alloc(sb->s_root, &name);
if (!dentry) {
iput(inode);
return ERR_PTR(-ENOMEM);
}
d_splice_alias(inode, dentry);
} else {
/*
* We found the inode in cache, just find a dentry for it and
* put the reference to the inode we just got.
*/
dentry = d_find_alias(inode);
iput(inode);
}

return dentry;
return d_obtain_alias(inode);
}

static int btrfs_fill_super(struct super_block *sb,
Expand Down

0 comments on commit 3cc4c6e

Please sign in to comment.