diff options
Diffstat (limited to 'fs/affs/namei.c')
-rw-r--r-- | fs/affs/namei.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/affs/namei.c b/fs/affs/namei.c index b407e9eea3fb..2218f1ee71ce 100644 --- a/fs/affs/namei.c +++ b/fs/affs/namei.c | |||
@@ -208,9 +208,8 @@ affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) | |||
208 | affs_lock_dir(dir); | 208 | affs_lock_dir(dir); |
209 | bh = affs_find_entry(dir, dentry); | 209 | bh = affs_find_entry(dir, dentry); |
210 | affs_unlock_dir(dir); | 210 | affs_unlock_dir(dir); |
211 | if (IS_ERR(bh)) { | 211 | if (IS_ERR(bh)) |
212 | return ERR_CAST(bh); | 212 | return ERR_CAST(bh); |
213 | } | ||
214 | if (bh) { | 213 | if (bh) { |
215 | u32 ino = bh->b_blocknr; | 214 | u32 ino = bh->b_blocknr; |
216 | 215 | ||
@@ -223,10 +222,9 @@ affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) | |||
223 | ino = be32_to_cpu(AFFS_TAIL(sb, bh)->original); | 222 | ino = be32_to_cpu(AFFS_TAIL(sb, bh)->original); |
224 | } | 223 | } |
225 | affs_brelse(bh); | 224 | affs_brelse(bh); |
226 | inode = iget(sb, ino); | 225 | inode = affs_iget(sb, ino); |
227 | if (!inode) { | 226 | if (IS_ERR(inode)) |
228 | return ERR_PTR(-EACCES); | 227 | return ERR_PTR(PTR_ERR(inode)); |
229 | } | ||
230 | } | 228 | } |
231 | dentry->d_op = AFFS_SB(sb)->s_flags & SF_INTL ? &affs_intl_dentry_operations : &affs_dentry_operations; | 229 | dentry->d_op = AFFS_SB(sb)->s_flags & SF_INTL ? &affs_intl_dentry_operations : &affs_dentry_operations; |
232 | d_add(dentry, inode); | 230 | d_add(dentry, inode); |