> On Mon, 2008-05-05 at 20:31 +0200, Miklos Szeredi wrote:And just to show how utterly trivially this could be done, here's a patch (totally untested). Hack? Hell, yes. Miklos --- fs/namei.c | 20 ++++++++++++-------- include/linux/fs.h | 1 + 2 files changed, 13 insertions(+), 8 deletions(-) Index: linux-2.6/fs/namei.c =================================================================== --- linux-2.6.orig/fs/namei.c 2008-05-05 12:03:24.000000000 +0200 +++ linux-2.6/fs/namei.c 2008-05-05 22:25:52.000000000 +0200 @@ -519,14 +519,18 @@ static struct dentry * real_lookup(struc */ result = d_lookup(parent, name); if (!result) { - struct dentry * dentry = d_alloc(parent, name); - result = ERR_PTR(-ENOMEM); - if (dentry) { - result = dir->i_op->lookup(dir, dentry, nd); - if (result) - dput(dentry); - else - result = dentry; + if (dir->i_op->lookup_path) { + result = dir->i_op->lookup_path(dir, name); + } else { + struct dentry * dentry = d_alloc(parent, name); + result = ERR_PTR(-ENOMEM); + if (dentry) { + result = dir->i_op->lookup(dir, dentry, nd); + if (result) + dput(dentry); + else + result = dentry; + } } mutex_unlock(&dir->i_mutex); return result; Index: linux-2.6/include/linux/fs.h =================================================================== --- linux-2.6.orig/include/linux/fs.h 2008-05-05 12:03:24.000000000 +0200 +++ linux-2.6/include/linux/fs.h 2008-05-05 22:26:59.000000000 +0200 @@ -1251,6 +1251,7 @@ struct file_operations { struct inode_operations { int (*create) (struct inode *,struct dentry *,int, struct nameidata *); struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); + struct dentry * (*lookup_path) (struct inode *, struct qstr *); int (*link) (struct dentry *,struct inode *,struct dentry *); int (*unlink) (struct inode *,struct dentry *); int (*symlink) (struct inode *,struct dentry *,const char *); --
| Manu Abraham | PCIE |
| Jared Hulbert | [PATCH 00/10] AXFS: Advanced XIP filesystem |
| Pardo | Re: pthread_create() slow for many threads; also time to revisit 64b context switc... |
| Tomasz Chmielewski | Re: [PATCH] Intel IXP4xx network drivers v.2 - Ethernet and HSS |
git: | |
| Thomas Glanzmann | fatal: serious inflate inconsistency |
| Jeff Garzik | Re: Using GIT to store /etc (Or: How to make GIT store all file permission bits) |
| Andy Parkins | Re: git-fetch and unannotated tags |
| Yossi Leybovich | corrupt object on git-gc |
| Richard Stallman | Real men don't attack straw men |
| Bertram Scharpf | First install: Grub doesn't find partitions |
| Unix Fan | Chatting with developers? Is it soo 1996? |
| Joel Wiramu Pauling | Re: Suggested PF Setup when using BitTorrent? |
| Vegard Nossum | Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison overwritten |
| Jarek Poplawski | Re: NMI lockup, 2.6.26 release |
| Tomas Winkler | [PATCH] iwlwifi: RS small compile warnings without CONFIG_IWLWIFI_DEBUG |
| Simon Horman | Re: [PATCH] sendfile() and UDP socket |
