1 fs/ext3/namei.c | 31 +++++++++++++++++++++++++++++++
2 include/linux/fs.h | 1 +
3 2 files changed, 32 insertions(+)
5 Index: lum/include/linux/fs.h
6 ===================================================================
7 --- lum.orig/include/linux/fs.h 2004-06-07 17:52:41.000000000 -0400
8 +++ lum/include/linux/fs.h 2004-06-07 17:56:55.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:52:41.000000000 -0400
20 +++ lum/fs/ext3/namei.c 2004-06-07 17:56:31.000000000 -0400
21 @@ -1128,6 +1128,36 @@
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;
34 + if (len > EXT3_NAME_LEN)
35 + return -ENAMETOOLONG;
37 + parent.d_inode = dir;
38 + dentry.d_parent = &parent;
39 + dentry.d_name.name = name;
40 + dentry.d_name.len = len;
42 + bh = ext3_find_entry(&dentry, &de, 0, &lock);
44 + unsigned long ino = le32_to_cpu(de->inode);
45 + ext3_unlock_htree(dir, lock);
49 + return 0; /* found name */
56 static unsigned char ext3_type_by_mode[S_IFMT >> S_SHIFT] = {
57 [S_IFREG >> S_SHIFT] EXT3_FT_REG_FILE,
59 struct inode_operations ext3_dir_inode_operations = {
60 create: ext3_create, /* BKL held */
61 lookup: ext3_lookup, /* BKL held */
62 + lookup_raw: ext3_lookup_raw, /* BKL held */
63 link: ext3_link, /* BKL held */
64 unlink: ext3_unlink, /* BKL held */
65 symlink: ext3_symlink, /* BKL held */