Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128926
b: refs/heads/master
c: 50ec891
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Chris Mason committed Sep 25, 2008
1 parent 08b25ab commit 0ee729f
Show file tree
Hide file tree
Showing 2 changed files with 3 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: 91c0827de247303c6dfc40a8ec9d8305e1d07986
refs/heads/master: 50ec891cc54fb865c4c40c45845e60123e0e66ca
17 changes: 2 additions & 15 deletions trunk/fs/btrfs/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ static struct dentry *btrfs_get_dentry(struct super_block *sb, u64 objectid,
{
struct btrfs_root *root;
struct inode *inode;
struct dentry *result;
struct btrfs_key key;

key.objectid = root_objectid;
Expand All @@ -92,11 +91,7 @@ static struct dentry *btrfs_get_dentry(struct super_block *sb, u64 objectid,
return ERR_PTR(-ESTALE);
}

result = d_obtain_alias(inode);
if (!result)
return ERR_PTR(-ENOMEM);

return result;
return d_obtain_alias(inode);
}

static struct dentry *btrfs_fh_to_parent(struct super_block *sb, struct fid *fh,
Expand Down Expand Up @@ -148,8 +143,6 @@ static struct dentry *btrfs_fh_to_dentry(struct super_block *sb, struct fid *fh,
static struct dentry *btrfs_get_parent(struct dentry *child)
{
struct inode *dir = child->d_inode;
struct inode *inode;
struct dentry *parent;
struct btrfs_root *root = BTRFS_I(dir)->root;
struct btrfs_key key;
struct btrfs_path *path;
Expand Down Expand Up @@ -203,13 +196,7 @@ static struct dentry *btrfs_get_parent(struct dentry *child)
btrfs_set_key_type(&key, BTRFS_INODE_ITEM_KEY);
key.offset = 0;

inode = btrfs_iget(root->fs_info->sb, &key, root, NULL);

parent = d_obtain_alias(inode);
if (!parent)
parent = ERR_PTR(-ENOMEM);

return parent;
return d_obtain_alias(btrfs_iget(root->fs_info->sb, &key, root, NULL));
}

const struct export_operations btrfs_export_ops = {
Expand Down

0 comments on commit 0ee729f

Please sign in to comment.