summaryrefslogtreecommitdiffstats
path: root/fs/affs/namei.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-02-15 22:06:08 +0100
committerSteve French <sfrench@us.ibm.com>2008-02-15 22:06:08 +0100
commit0a3abcf75bf391fec4e32356ab5ddb8f5d2e6b41 (patch)
treeb80b1d344ec24cad28b057ef803cebac9434be01 /fs/affs/namei.c
parent[CIFS] factoring out common code in get_inode_info functions (diff)
parentLinux 2.6.25-rc2 (diff)
downloadlinux-0a3abcf75bf391fec4e32356ab5ddb8f5d2e6b41.tar.xz
linux-0a3abcf75bf391fec4e32356ab5ddb8f5d2e6b41.zip
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/affs/namei.c')
-rw-r--r--fs/affs/namei.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index a42143ca0169..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)
affs_lock_dir(dir);
bh = affs_find_entry(dir, dentry);
affs_unlock_dir(dir);
- if (IS_ERR(bh)) {
- return ERR_PTR(PTR_ERR(bh));
- }
+ if (IS_ERR(bh))
+ return ERR_CAST(bh);
if (bh) {
u32 ino = bh->b_blocknr;
@@ -223,10 +222,9 @@ affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
ino = be32_to_cpu(AFFS_TAIL(sb, bh)->original);
}
affs_brelse(bh);
- inode = iget(sb, ino);
- if (!inode) {
- return ERR_PTR(-EACCES);
- }
+ inode = affs_iget(sb, ino);
+ if (IS_ERR(inode))
+ return ERR_PTR(PTR_ERR(inode));
}
dentry->d_op = AFFS_SB(sb)->s_flags & SF_INTL ? &affs_intl_dentry_operations : &affs_dentry_operations;
d_add(dentry, inode);