diff options
Diffstat (limited to 'fs/nilfs2/namei.c')
-rw-r--r-- | fs/nilfs2/namei.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c index ad6ed2cf19b4..1110d56a23f5 100644 --- a/fs/nilfs2/namei.c +++ b/fs/nilfs2/namei.c | |||
@@ -70,7 +70,7 @@ nilfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) | |||
70 | ino = nilfs_inode_by_name(dir, &dentry->d_name); | 70 | ino = nilfs_inode_by_name(dir, &dentry->d_name); |
71 | inode = NULL; | 71 | inode = NULL; |
72 | if (ino) { | 72 | if (ino) { |
73 | inode = nilfs_iget(dir->i_sb, ino); | 73 | inode = nilfs_iget(dir->i_sb, NILFS_I(dir)->i_root, ino); |
74 | if (IS_ERR(inode)) | 74 | if (IS_ERR(inode)) |
75 | return ERR_CAST(inode); | 75 | return ERR_CAST(inode); |
76 | } | 76 | } |
@@ -87,7 +87,8 @@ struct dentry *nilfs_get_parent(struct dentry *child) | |||
87 | if (!ino) | 87 | if (!ino) |
88 | return ERR_PTR(-ENOENT); | 88 | return ERR_PTR(-ENOENT); |
89 | 89 | ||
90 | inode = nilfs_iget(child->d_inode->i_sb, ino); | 90 | inode = nilfs_iget(child->d_inode->i_sb, |
91 | NILFS_I(child->d_inode)->i_root, ino); | ||
91 | if (IS_ERR(inode)) | 92 | if (IS_ERR(inode)) |
92 | return ERR_CAST(inode); | 93 | return ERR_CAST(inode); |
93 | return d_obtain_alias(inode); | 94 | return d_obtain_alias(inode); |