Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257400
b: refs/heads/master
c: 79ac5a4
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Jul 21, 2011
1 parent a6c7d90 commit 7c7612d
Show file tree
Hide file tree
Showing 2 changed files with 16 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: 10d9f309d88ca7f47133d57e99b72810f119f75b
refs/heads/master: 79ac5a46c5c1c17476fbf84b4d4600d6d565defd
39 changes: 15 additions & 24 deletions trunk/fs/jfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,34 +1456,25 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struc
ino_t inum;
struct inode *ip;
struct component_name key;
const char *name = dentry->d_name.name;
int len = dentry->d_name.len;
int rc;

jfs_info("jfs_lookup: name = %s", name);

if ((name[0] == '.') && (len == 1))
inum = dip->i_ino;
else if (strcmp(name, "..") == 0)
inum = PARENT(dip);
else {
if ((rc = get_UCSname(&key, dentry)))
return ERR_PTR(rc);
rc = dtSearch(dip, &key, &inum, &btstack, JFS_LOOKUP);
free_UCSname(&key);
if (rc == -ENOENT) {
d_add(dentry, NULL);
return NULL;
} else if (rc) {
jfs_err("jfs_lookup: dtSearch returned %d", rc);
return ERR_PTR(rc);
}
jfs_info("jfs_lookup: name = %s", dentry->d_name.name);

if ((rc = get_UCSname(&key, dentry)))
return ERR_PTR(rc);
rc = dtSearch(dip, &key, &inum, &btstack, JFS_LOOKUP);
free_UCSname(&key);
if (rc == -ENOENT) {
ip = NULL;
} else if (rc) {
jfs_err("jfs_lookup: dtSearch returned %d", rc);
ip = ERR_PTR(rc);
} else {
ip = jfs_iget(dip->i_sb, inum);
if (IS_ERR(ip))
jfs_err("jfs_lookup: iget failed on inum %d", (uint)inum);
}

ip = jfs_iget(dip->i_sb, inum);
if (IS_ERR(ip))
jfs_err("jfs_lookup: iget failed on inum %d", (uint) inum);

return d_splice_alias(ip, dentry);
}

Expand Down

0 comments on commit 7c7612d

Please sign in to comment.