1 fs/ext3/namei.c | 29 +++++++++++++++++++++++++++++
2 include/linux/fs.h | 1 +
3 2 files changed, 30 insertions(+)
5 Index: lum/include/linux/fs.h
6 ===================================================================
7 --- lum.orig/include/linux/fs.h 2004-06-07 17:25:40.000000000 -0400
8 +++ lum/include/linux/fs.h 2004-06-07 17:26:11.000000000 -0400
10 int (*create) (struct inode *,struct dentry *,int);
11 int (*create_it) (struct inode *,struct dentry *,int, struct lookup_intent *);
12 struct dentry * (*lookup) (struct inode *,struct dentry *);
13 + int (*lookup_raw) (struct inode *, const char *, int, ino_t *);
14 struct dentry * (*lookup_it) (struct inode *,struct dentry *, struct nameidata *, struct lookup_intent *, int flags);
15 int (*link) (struct dentry *,struct inode *,struct dentry *);
16 int (*link_raw) (struct nameidata *,struct nameidata *);
17 Index: lum/fs/ext3/namei.c
18 ===================================================================
19 --- lum.orig/fs/ext3/namei.c 2004-06-07 17:25:39.000000000 -0400
20 +++ lum/fs/ext3/namei.c 2004-06-07 17:25:47.000000000 -0400
21 @@ -1128,6 +1128,34 @@
22 return iopen_connect_dentry(dentry, inode, 1);
25 +static int ext3_lookup_raw(struct inode *dir, const char *name,
26 + int len, ino_t *data)
28 + struct ext3_dir_entry_2 *de;
29 + struct buffer_head *bh;
30 + struct dentry parent;
31 + struct dentry dentry;
33 + if (len > EXT3_NAME_LEN)
34 + return -ENAMETOOLONG;
36 + parent.d_inode = dir;
37 + dentry.d_parent = &parent;
38 + dentry.d_name.name = name;
39 + dentry.d_name.len = len;
41 + bh = ext3_find_entry(&dentry, &de);
43 + unsigned long ino = le32_to_cpu(de->inode);
47 + return 0; /* found name */
54 static unsigned char ext3_type_by_mode[S_IFMT >> S_SHIFT] = {
55 [S_IFREG >> S_SHIFT] EXT3_FT_REG_FILE,
57 struct inode_operations ext3_dir_inode_operations = {
58 create: ext3_create, /* BKL held */
59 lookup: ext3_lookup, /* BKL held */
60 + lookup_raw: ext3_lookup_raw, /* BKL held */
61 link: ext3_link, /* BKL held */
62 unlink: ext3_unlink, /* BKL held */
63 symlink: ext3_symlink, /* BKL held */