namei.c (348b346b238d9c0e5694c8d0b835a099cb383835) namei.c (4d6c13f87db12ae1ce35ea6a15688ac72419b133)
1/*
2 * linux/fs/ext2/namei.c
3 *
4 * Rewrite to pagecache. Almost all code had been changed, so blame me
5 * if the things go wrong. Please, send bug reports to
6 * viro@parcelfarce.linux.theplanet.co.uk
7 *
8 * Stuff here is basically a glue between the VFS and generic UNIXish

--- 52 unchanged lines hidden (view full) ---

61
62 if (dentry->d_name.len > EXT2_NAME_LEN)
63 return ERR_PTR(-ENAMETOOLONG);
64
65 ino = ext2_inode_by_name(dir, &dentry->d_name);
66 inode = NULL;
67 if (ino) {
68 inode = ext2_iget(dir->i_sb, ino);
1/*
2 * linux/fs/ext2/namei.c
3 *
4 * Rewrite to pagecache. Almost all code had been changed, so blame me
5 * if the things go wrong. Please, send bug reports to
6 * viro@parcelfarce.linux.theplanet.co.uk
7 *
8 * Stuff here is basically a glue between the VFS and generic UNIXish

--- 52 unchanged lines hidden (view full) ---

61
62 if (dentry->d_name.len > EXT2_NAME_LEN)
63 return ERR_PTR(-ENAMETOOLONG);
64
65 ino = ext2_inode_by_name(dir, &dentry->d_name);
66 inode = NULL;
67 if (ino) {
68 inode = ext2_iget(dir->i_sb, ino);
69 if (IS_ERR(inode))
70 return ERR_CAST(inode);
69 if (unlikely(IS_ERR(inode))) {
70 if (PTR_ERR(inode) == -ESTALE) {
71 ext2_error(dir->i_sb, __func__,
72 "deleted inode referenced: %lu",
73 ino);
74 return ERR_PTR(-EIO);
75 } else {
76 return ERR_CAST(inode);
77 }
78 }
71 }
72 return d_splice_alias(inode, dentry);
73}
74
75struct dentry *ext2_get_parent(struct dentry *child)
76{
77 struct qstr dotdot = {.name = "..", .len = 2};
78 unsigned long ino = ext2_inode_by_name(child->d_inode, &dotdot);

--- 325 unchanged lines hidden ---
79 }
80 return d_splice_alias(inode, dentry);
81}
82
83struct dentry *ext2_get_parent(struct dentry *child)
84{
85 struct qstr dotdot = {.name = "..", .len = 2};
86 unsigned long ino = ext2_inode_by_name(child->d_inode, &dotdot);

--- 325 unchanged lines hidden ---