1 Index: linux-2.6/fs/inode.c
2 ===================================================================
3 --- linux-2.6.orig/fs/inode.c 2006-08-31 11:17:39.000000000 +0800
4 +++ linux-2.6/fs/inode.c 2006-08-31 11:23:48.000000000 +0800
5 @@ -234,6 +234,7 @@ void __iget(struct inode * inode)
6 inodes_stat.nr_unused--;
9 +EXPORT_SYMBOL(__iget);
11 * clear_inode - clear an inode
12 * @inode: inode to clear
13 Index: linux-2.6/fs/open.c
14 ===================================================================
15 --- linux-2.6.orig/fs/open.c 2006-08-31 11:17:39.000000000 +0800
16 +++ linux-2.6/fs/open.c 2006-08-31 11:59:09.000000000 +0800
17 @@ -226,11 +226,12 @@ static long do_sys_truncate(const char _
21 + intent_init(&nd.intent.open, IT_GETATTR);
23 if (length < 0) /* sorry, but loff_t says... */
26 - error = user_path_walk(path, &nd);
27 + error = user_path_walk_it(path, &nd);
30 inode = nd.dentry->d_inode;
31 @@ -495,6 +496,7 @@ asmlinkage long sys_faccessat(int dfd, c
32 int old_fsuid, old_fsgid;
35 + intent_init(&nd.intent.open, IT_GETATTR);
37 if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */
39 @@ -519,7 +521,7 @@ asmlinkage long sys_faccessat(int dfd, c
41 current->cap_effective = current->cap_permitted;
43 - res = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
44 + res = __user_walk_fd_it(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
46 res = vfs_permission(&nd, mode);
47 /* SuS v2 requires we report a read only fs too */
48 @@ -545,8 +547,9 @@ asmlinkage long sys_chdir(const char __u
52 + intent_init(&nd.intent.open, IT_GETATTR);
54 - error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
55 + error = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
59 @@ -596,8 +599,9 @@ asmlinkage long sys_chroot(const char __
63 + intent_init(&nd.intent.open, IT_GETATTR);
65 - error = __user_walk(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
66 + error = __user_walk_it(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
70 @@ -823,6 +827,7 @@ static struct file *__dentry_open(struct
71 error = open(inode, f);
74 + intent_release(f->f_it);
77 f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
78 @@ -849,6 +854,7 @@ cleanup_all:
82 + intent_release(f->f_it);
86 @@ -874,6 +880,7 @@ static struct file *do_filp_open(int dfd
88 int namei_flags, error;
90 + intent_init(&nd.intent.open, IT_OPEN);
93 if ((namei_flags+1) & O_ACCMODE)
94 @@ -944,6 +951,7 @@ struct file *nameidata_to_filp(struct na
96 /* Pick up the filp from the open intent */
97 filp = nd->intent.open.file;
98 + filp->f_it = &nd->intent.open;
99 /* Has the filesystem initialised the file for us? */
100 if (filp->f_dentry == NULL)
101 filp = __dentry_open(nd->dentry, nd->mnt, flags, filp, NULL);
102 Index: linux-2.6/fs/nfsctl.c
103 ===================================================================
104 --- linux-2.6.orig/fs/nfsctl.c 2006-08-31 11:17:39.000000000 +0800
105 +++ linux-2.6/fs/nfsctl.c 2006-08-31 11:23:48.000000000 +0800
106 @@ -25,6 +25,7 @@ static struct file *do_open(char *name,
110 + intent_init(&nd.intent.open, IT_OPEN);
111 nd.mnt = do_kern_mount("nfsd", 0, "nfsd", NULL);
114 Index: linux-2.6/fs/namei.c
115 ===================================================================
116 --- linux-2.6.orig/fs/namei.c 2006-08-31 11:17:39.000000000 +0800
117 +++ linux-2.6/fs/namei.c 2006-08-31 11:59:09.000000000 +0800
118 @@ -344,8 +344,19 @@ int deny_write_access(struct file * file
122 +void intent_release(struct lookup_intent *it)
126 + if (it->it_magic != INTENT_MAGIC)
128 + if (it->it_op_release)
129 + it->it_op_release(it);
132 void path_release(struct nameidata *nd)
134 + intent_release(&nd->intent);
138 @@ -447,8 +458,12 @@ static struct dentry * real_lookup(struc
140 struct dentry * result;
141 struct inode *dir = parent->d_inode;
144 mutex_lock(&dir->i_mutex);
149 * First re-do the cached lookup just in case it was created
150 * while we waited for the directory semaphore..
151 @@ -482,13 +497,16 @@ static struct dentry * real_lookup(struc
152 * Uhhuh! Nasty case: the cache was re-populated while
153 * we waited on the semaphore. Need to revalidate.
155 - mutex_unlock(&dir->i_mutex);
156 if (result->d_op && result->d_op->d_revalidate) {
157 if (!result->d_op->d_revalidate(result, nd) && !d_invalidate(result)) {
159 - result = ERR_PTR(-ENOENT);
161 + result = ERR_PTR(-ESTALE);
162 + if (!IS_ERR(result))
166 + mutex_unlock(&dir->i_mutex);
170 @@ -516,7 +534,9 @@ walk_init_root(const char *name, struct
171 static __always_inline int __vfs_follow_link(struct nameidata *nd, const char *link)
174 + struct lookup_intent it = nd->intent.open;
180 @@ -526,6 +546,10 @@ static __always_inline int __vfs_follow_
181 /* weird __emul_prefix() stuff did it */
184 + intent_init(&nd->intent.open, it.it_op);
185 + nd->intent.open.it_flags = it.it_flags;
186 + nd->intent.open.it_create_mode = it.it_create_mode;
187 + nd->intent.open.file = it.file;
188 res = link_path_walk(link, nd);
190 if (nd->depth || res || nd->last_type!=LAST_NORM)
191 @@ -778,6 +802,33 @@ fail:
192 return PTR_ERR(dentry);
195 +static int revalidate_special(struct nameidata *nd)
197 + struct dentry *dentry = nd->dentry;
198 + int err, counter = 0;
201 + if (!dentry->d_op || !dentry->d_op->d_revalidate)
203 + if (!dentry->d_op->d_revalidate(dentry, nd)) {
204 + struct dentry *new;
205 + if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC, nd)))
207 + new = real_lookup(dentry->d_parent, &dentry->d_name, nd);
209 + return PTR_ERR(new);
210 + d_invalidate(dentry);
212 + nd->dentry = dentry = new;
215 + goto revalidate_again;
216 + //printk("excessive revalidate_it loops\n");
224 * This is the basic name resolution function, turning a pathname into
225 @@ -874,7 +925,11 @@ static fastcall int __link_path_walk(con
228 if (inode->i_op->follow_link) {
229 + int save_flags = nd->flags;
230 + nd->flags |= LOOKUP_LINK_NOTLAST;
231 err = do_follow_link(&next, nd);
232 + if (!(save_flags & LOOKUP_LINK_NOTLAST))
233 + nd->flags &= ~LOOKUP_LINK_NOTLAST;
237 @@ -909,6 +964,23 @@ last_component:
238 inode = nd->dentry->d_inode;
241 + nd->flags |= LOOKUP_LAST;
242 + err = revalidate_special(nd);
243 + nd->flags &= ~LOOKUP_LAST;
244 + if (!nd->dentry->d_inode)
250 + if (lookup_flags & LOOKUP_DIRECTORY) {
252 + if(!nd->dentry->d_inode->i_op ||
253 + !nd->dentry->d_inode->i_op->lookup) {
260 if (nd->dentry->d_op && nd->dentry->d_op->d_hash) {
261 @@ -916,7 +988,9 @@ last_component:
265 + nd->flags |= LOOKUP_LAST;
266 err = do_lookup(nd, &this, &next);
267 + nd->flags &= ~LOOKUP_LAST;
270 inode = next.dentry->d_inode;
271 @@ -1268,7 +1342,7 @@ static struct dentry *lookup_hash(struct
275 -struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
276 +struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd)
280 @@ -1288,11 +1362,17 @@ struct dentry * lookup_one_len(const cha
282 this.hash = end_name_hash(hash);
284 - return __lookup_hash(&this, base, NULL);
285 + return __lookup_hash(&this, base, nd);
287 return ERR_PTR(-EACCES);
290 +struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
292 + return lookup_one_len_it(name, base, len, NULL);
299 @@ -1304,8 +1384,9 @@ access:
300 * that namei follows links, while lnamei does not.
303 -int fastcall __user_walk_fd(int dfd, const char __user *name, unsigned flags,
304 - struct nameidata *nd)
306 +int fastcall __user_walk_fd_it(int dfd, const char __user *name, unsigned flags,
307 + struct nameidata *nd)
309 char *tmp = getname(name);
310 int err = PTR_ERR(tmp);
311 @@ -1317,9 +1398,22 @@ int fastcall __user_walk_fd(int dfd, con
315 +int fastcall __user_walk_fd(int dfd, const char __user *name, unsigned flags,
316 + struct nameidata *nd)
318 + intent_init(&nd->intent.open, IT_LOOKUP);
319 + return __user_walk_fd_it(dfd, name, flags, nd);
322 +int fastcall __user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd)
324 + return __user_walk_fd_it(AT_FDCWD, name, flags, nd);
327 int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd)
329 - return __user_walk_fd(AT_FDCWD, name, flags, nd);
330 + intent_init(&nd->intent.open, IT_LOOKUP);
331 + return __user_walk_it(name, flags, nd);
335 @@ -1600,6 +1694,8 @@ int open_namei(int dfd, const char *path
337 acc_mode |= MAY_APPEND;
339 + nd->intent.open.it_flags = flag;
340 + nd->intent.open.it_create_mode = mode;
342 * The simplest case - just a plain lookup.
344 @@ -1614,6 +1710,7 @@ int open_namei(int dfd, const char *path
346 * Create - we need to know the parent.
348 + nd->intent.open.it_op |= IT_CREAT;
349 error = path_lookup_create(dfd,pathname,LOOKUP_PARENT,nd,flag,mode);
352 @@ -1630,7 +1727,9 @@ int open_namei(int dfd, const char *path
354 nd->flags &= ~LOOKUP_PARENT;
355 mutex_lock(&dir->d_inode->i_mutex);
356 + nd->flags |= LOOKUP_LAST;
357 path.dentry = lookup_hash(nd);
358 + nd->flags &= ~LOOKUP_LAST;
362 @@ -1746,7 +1845,9 @@ do_link:
365 mutex_lock(&dir->d_inode->i_mutex);
366 + nd->flags |= LOOKUP_LAST;
367 path.dentry = lookup_hash(nd);
368 + nd->flags &= ~LOOKUP_LAST;
370 __putname(nd->last.name);
372 @@ -2260,6 +2361,9 @@ asmlinkage long sys_linkat(int olddfd, c
376 + intent_init(&nd.intent.open, IT_LOOKUP);
377 + intent_init(&old_nd.intent.open, IT_LOOKUP);
379 if ((flags & ~AT_SYMLINK_FOLLOW) != 0)
382 @@ -2267,7 +2371,7 @@ asmlinkage long sys_linkat(int olddfd, c
386 - error = __user_walk_fd(olddfd, oldname,
387 + error = __user_walk_fd_it(olddfd, oldname,
388 flags & AT_SYMLINK_FOLLOW ? LOOKUP_FOLLOW : 0,
391 Index: linux-2.6/fs/stat.c
392 ===================================================================
393 --- linux-2.6.orig/fs/stat.c 2006-08-31 11:17:39.000000000 +0800
394 +++ linux-2.6/fs/stat.c 2006-08-31 11:23:48.000000000 +0800
395 @@ -37,7 +37,7 @@ void generic_fillattr(struct inode *inod
397 EXPORT_SYMBOL(generic_fillattr);
399 -int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
400 +int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat)
402 struct inode *inode = dentry->d_inode;
404 @@ -46,6 +46,8 @@ int vfs_getattr(struct vfsmount *mnt, st
408 + if (inode->i_op->getattr_it)
409 + return inode->i_op->getattr_it(mnt, dentry, it, stat);
410 if (inode->i_op->getattr)
411 return inode->i_op->getattr(mnt, dentry, stat);
413 @@ -60,6 +62,11 @@ int vfs_getattr(struct vfsmount *mnt, st
417 +int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
419 + return vfs_getattr_it(mnt, dentry, NULL, stat);
422 EXPORT_SYMBOL(vfs_getattr);
424 int vfs_stat_fd(int dfd, char __user *name, struct kstat *stat)
425 @@ -67,9 +74,10 @@ int vfs_stat_fd(int dfd, char __user *na
429 - error = __user_walk_fd(dfd, name, LOOKUP_FOLLOW, &nd);
430 + intent_init(&nd.intent.open, IT_GETATTR);
431 + error = __user_walk_fd_it(dfd, name, LOOKUP_FOLLOW, &nd);
433 - error = vfs_getattr(nd.mnt, nd.dentry, stat);
434 + error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent.open, stat);
438 @@ -87,9 +95,10 @@ int vfs_lstat_fd(int dfd, char __user *n
442 - error = __user_walk_fd(dfd, name, 0, &nd);
443 + intent_init(&nd.intent.open, IT_GETATTR);
444 + error = __user_walk_fd_it(dfd, name, 0, &nd);
446 - error = vfs_getattr(nd.mnt, nd.dentry, stat);
447 + error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent.open, stat);
451 @@ -106,9 +115,12 @@ int vfs_fstat(unsigned int fd, struct ks
453 struct file *f = fget(fd);
455 + struct nameidata nd;
456 + intent_init(&nd.intent.open, IT_GETATTR);
459 - error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat);
460 + error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent.open, stat);
461 + intent_release(&nd.intent.open);
465 Index: linux-2.6/fs/namespace.c
466 ===================================================================
467 --- linux-2.6.orig/fs/namespace.c 2006-08-31 11:17:39.000000000 +0800
468 +++ linux-2.6/fs/namespace.c 2006-08-31 11:59:07.000000000 +0800
469 @@ -73,6 +73,7 @@ struct vfsmount *alloc_vfsmnt(const char
470 INIT_LIST_HEAD(&mnt->mnt_share);
471 INIT_LIST_HEAD(&mnt->mnt_slave_list);
472 INIT_LIST_HEAD(&mnt->mnt_slave);
473 + INIT_LIST_HEAD(&mnt->mnt_lustre_list);
475 int size = strlen(name) + 1;
476 char *newname = kmalloc(size, GFP_KERNEL);
477 @@ -162,6 +163,7 @@ static void __touch_namespace(struct nam
479 static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd)
481 + memset(old_nd, 0, sizeof(*old_nd));
482 old_nd->dentry = mnt->mnt_mountpoint;
483 old_nd->mnt = mnt->mnt_parent;
484 mnt->mnt_parent = mnt;
485 @@ -280,6 +282,9 @@ static inline void __mntput(struct vfsmo
487 struct super_block *sb = mnt->mnt_sb;
489 + spin_lock(&dcache_lock);
490 + list_del(&mnt->mnt_lustre_list);
491 + spin_unlock(&dcache_lock);
493 deactivate_super(sb);
495 @@ -582,6 +587,8 @@ static int do_umount(struct vfsmount *mn
499 + if (sb->s_op->umount_lustre)
500 + sb->s_op->umount_lustre(sb);
501 if (sb->s_op->umount_begin)
502 sb->s_op->umount_begin(mnt, flags);
504 @@ -914,6 +921,7 @@ static int do_loopback(struct nameidata
506 if (!old_name || !*old_name)
508 + intent_init(&old_nd.intent.open, IT_LOOKUP);
509 err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
512 @@ -999,6 +1007,7 @@ static int do_move_mount(struct nameidat
514 if (!old_name || !*old_name)
516 + intent_init(&old_nd.intent.open, IT_LOOKUP);
517 err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
520 @@ -1388,6 +1397,7 @@ long do_mount(char *dev_name, char *dir_
524 + intent_init(&nd.intent.open, IT_LOOKUP);
526 if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
527 flags &= ~MS_MGC_MSK;
528 Index: linux-2.6/fs/exec.c
529 ===================================================================
530 --- linux-2.6.orig/fs/exec.c 2006-08-31 11:17:39.000000000 +0800
531 +++ linux-2.6/fs/exec.c 2006-08-31 11:59:09.000000000 +0800
532 @@ -127,6 +127,7 @@ asmlinkage long sys_uselib(const char __
536 + intent_init(&nd.intent.open, IT_OPEN);
537 error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ|FMODE_EXEC);
540 @@ -477,6 +478,7 @@ struct file *open_exec(const char *name)
544 + intent_init(&nd.intent.open, IT_OPEN);
545 err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ|FMODE_EXEC);
548 Index: linux-2.6/include/linux/dcache.h
549 ===================================================================
550 --- linux-2.6.orig/include/linux/dcache.h 2006-08-31 11:17:39.000000000 +0800
551 +++ linux-2.6/include/linux/dcache.h 2006-08-31 12:00:07.000000000 +0800
552 @@ -36,6 +36,9 @@ struct qstr {
553 const unsigned char *name;
557 +#include <linux/namei.h>
559 struct dentry_stat_t {
562 Index: linux-2.6/include/linux/fs.h
563 ===================================================================
564 --- linux-2.6.orig/include/linux/fs.h 2006-08-31 11:17:39.000000000 +0800
565 +++ linux-2.6/include/linux/fs.h 2006-08-31 11:59:09.000000000 +0800
566 @@ -280,6 +280,8 @@ typedef void (dio_iodone_t)(struct kiocb
567 #define ATTR_KILL_SUID 2048
568 #define ATTR_KILL_SGID 4096
569 #define ATTR_FILE 8192
570 +#define ATTR_RAW 16384 /* file system, not vfs will massage attrs */
571 +#define ATTR_FROM_OPEN 32768 /* called from open path, ie O_TRUNC */
574 * This is the Inode Attributes structure, used for notify_change(). It
575 @@ -533,6 +535,7 @@ struct inode {
576 struct block_device *i_bdev;
579 + void *i_filterdata;
583 @@ -700,6 +703,7 @@ struct file {
584 spinlock_t f_ep_lock;
585 #endif /* #ifdef CONFIG_EPOLL */
586 struct address_space *f_mapping;
587 + struct lookup_intent *f_it;
589 extern spinlock_t files_lock;
590 #define file_list_lock() spin_lock(&files_lock);
591 @@ -1100,7 +1104,9 @@ struct inode_operations {
592 void (*truncate) (struct inode *);
593 int (*permission) (struct inode *, int, struct nameidata *);
594 int (*setattr) (struct dentry *, struct iattr *);
595 + int (*setattr_raw) (struct inode *, struct iattr *);
596 int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
597 + int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *);
598 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
599 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
600 ssize_t (*listxattr) (struct dentry *, char *, size_t);
601 @@ -1141,6 +1147,7 @@ struct super_operations {
602 int (*remount_fs) (struct super_block *, int *, char *);
603 void (*clear_inode) (struct inode *);
604 void (*umount_begin) (struct vfsmount *, int);
605 + void (*umount_lustre) (struct super_block *);
607 int (*show_options)(struct seq_file *, struct vfsmount *);
608 int (*show_stats)(struct seq_file *, struct vfsmount *);
609 @@ -1363,6 +1370,7 @@ extern int may_umount_tree(struct vfsmou
610 extern int may_umount(struct vfsmount *);
611 extern void umount_tree(struct vfsmount *, int, struct list_head *);
612 extern void release_mounts(struct list_head *);
613 +struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data);
614 extern long do_mount(char *, char *, char *, unsigned long, void *);
615 extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
616 extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
617 @@ -1424,6 +1432,7 @@ extern long do_sys_open(int fdf, const c
619 extern struct file *filp_open(const char *, int, int);
620 extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
621 +extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *);
622 extern int filp_close(struct file *, fl_owner_t id);
623 extern char * getname(const char __user *);
625 Index: linux-2.6/include/linux/namei.h
626 ===================================================================
627 --- linux-2.6.orig/include/linux/namei.h 2006-08-31 11:17:39.000000000 +0800
628 +++ linux-2.6/include/linux/namei.h 2006-08-31 11:23:48.000000000 +0800
634 +#define IT_CREAT (1<<1)
635 +#define IT_READDIR (1<<2)
636 +#define IT_GETATTR (1<<3)
637 +#define IT_LOOKUP (1<<4)
638 +#define IT_UNLINK (1<<5)
639 +#define IT_TRUNC (1<<6)
640 +#define IT_GETXATTR (1<<7)
642 +struct lustre_intent_data {
643 + int it_disposition;
645 + __u64 it_lock_handle;
650 +#define INTENT_MAGIC 0x19620323
652 +#define it_flags flags
653 +#define it_create_mode create_mode
654 +#define lookup_intent open_intent
661 + void (*it_op_release)(struct open_intent *);
667 + struct lustre_intent_data lustre;
671 enum { MAX_NESTED_LINKS = 8 };
672 @@ -28,6 +57,13 @@ struct nameidata {
676 +static inline void intent_init(struct lookup_intent *it, int op)
678 + memset(it, 0, sizeof(*it));
679 + it->it_magic = INTENT_MAGIC;
684 * Type of the last component on LOOKUP_PARENT
686 @@ -48,6 +84,8 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA
687 #define LOOKUP_PARENT 16
688 #define LOOKUP_NOALT 32
689 #define LOOKUP_REVAL 64
690 +#define LOOKUP_LAST (0x1000)
691 +#define LOOKUP_LINK_NOTLAST (0x2000)
695 @@ -57,10 +95,19 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA
697 extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *));
698 extern int FASTCALL(__user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *));
699 +extern int FASTCALL(__user_walk_fd_it(int dfd, const char __user *, unsigned, struct nameidata *));
700 #define user_path_walk(name,nd) \
701 __user_walk_fd(AT_FDCWD, name, LOOKUP_FOLLOW, nd)
702 #define user_path_walk_link(name,nd) \
703 __user_walk_fd(AT_FDCWD, name, 0, nd)
705 +extern int FASTCALL(__user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd));
706 +#define user_path_walk_it(name,nd) \
707 + __user_walk_it(name, LOOKUP_FOLLOW, nd)
708 +#define user_path_walk_link_it(name,nd) \
709 + __user_walk_it(name, 0, nd)
710 +extern void intent_release(struct lookup_intent *);
712 extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *));
713 extern int FASTCALL(path_walk(const char *, struct nameidata *));
714 extern int FASTCALL(link_path_walk(const char *, struct nameidata *));
715 Index: linux-2.6/include/linux/mount.h
716 ===================================================================
717 --- linux-2.6.orig/include/linux/mount.h 2006-08-31 11:17:40.000000000 +0800
718 +++ linux-2.6/include/linux/mount.h 2006-08-31 11:23:48.000000000 +0800
719 @@ -53,6 +53,8 @@ struct vfsmount {
720 struct list_head mnt_slave; /* slave list entry */
721 struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */
722 struct namespace *mnt_namespace; /* containing namespace */
723 + struct list_head mnt_lustre_list; /* GNS mount list */
724 + unsigned long mnt_last_used; /* for GNS auto-umount (jiffies) */