1 fs/exec.c | 18 +++++++---
2 fs/namei.c | 86 +++++++++++++++++++++++++++++++++++++++++++++----
5 fs/open.c | 62 +++++++++++++++++++++++------------
6 fs/stat.c | 24 ++++++++++---
7 include/linux/dcache.h | 3 +
8 include/linux/fs.h | 8 ++++
9 include/linux/namei.h | 56 ++++++++++++++++++++++++++-----
10 kernel/ksyms.c | 8 ++++
11 10 files changed, 222 insertions(+), 49 deletions(-)
13 --- linux-2.6.0-test1/fs/exec.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:34.000000000 +0400
14 +++ linux-2.6.0-test1-alexey/fs/exec.c 2003-09-14 18:13:44.000000000 +0400
15 @@ -116,8 +116,11 @@ asmlinkage long sys_uselib(const char __
19 + intent_init(&nd.intent, IT_OPEN);
21 - nd.intent.open.flags = O_RDONLY;
22 + error = user_path_walk_it(library, &nd);
24 + nd.intent.it_flags = O_RDONLY;
25 error = __user_walk(library, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd);
28 @@ -130,7 +133,7 @@ asmlinkage long sys_uselib(const char __
32 - file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
33 + file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent);
34 error = PTR_ERR(file);
37 @@ -457,8 +460,13 @@ static inline void free_arg_pages(struct
38 struct file *open_exec(const char *name)
41 - int err = path_lookup(name, LOOKUP_FOLLOW, &nd);
42 - struct file *file = ERR_PTR(err);
46 + intent_init(&nd.intent, IT_OPEN);
47 + nd.intent.it_flags = O_RDONLY;
48 + err = path_lookup(name, LOOKUP_FOLLOW, &nd);
49 + file = ERR_PTR(err);
52 struct inode *inode = nd.dentry->d_inode;
53 @@ -470,7 +478,7 @@ struct file *open_exec(const char *name)
57 - file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
58 + file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent);
60 err = deny_write_access(file);
62 --- linux-2.6.0-test1/fs/namei.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:34.000000000 +0400
63 +++ linux-2.6.0-test1-alexey/fs/namei.c 2003-09-14 18:15:11.000000000 +0400
64 @@ -263,8 +263,19 @@ int deny_write_access(struct file * file
68 +void intent_release(struct lookup_intent *it)
72 + if (it->it_magic != INTENT_MAGIC)
74 + if (it->it_op_release)
75 + it->it_op_release(it);
78 void path_release(struct nameidata *nd)
80 + intent_release(&nd->intent);
84 @@ -340,7 +351,10 @@ static struct dentry * real_lookup(struc
86 struct dentry * result;
87 struct inode *dir = parent->d_inode;
94 * First re-do the cached lookup just in case it was created
95 @@ -379,7 +393,10 @@ static struct dentry * real_lookup(struc
96 if (result->d_op && result->d_op->d_revalidate) {
97 if (!result->d_op->d_revalidate(result, nd) && !d_invalidate(result)) {
99 - result = ERR_PTR(-ENOENT);
101 + result = ERR_PTR(-ESTALE);
102 + if (!IS_ERR(result))
107 @@ -554,6 +571,31 @@ fail:
108 return PTR_ERR(dentry);
111 +static int revalidate_special(struct nameidata *nd)
113 + struct dentry *dentry = nd->dentry;
114 + int err, counter = 0;
116 + if (!dentry->d_op || !dentry->d_op->d_revalidate)
119 + if (!dentry->d_op->d_revalidate(dentry, nd)) {
120 + struct dentry *new;
121 + if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC,nd)))
123 + new = real_lookup(dentry->d_parent, &dentry->d_name, nd);
124 + d_invalidate(dentry);
129 + goto revalidate_again;
130 + printk("excessive revalidate_it loops\n");
139 @@ -654,7 +696,9 @@ int link_path_walk(const char * name, st
141 if (inode->i_op->follow_link) {
143 + nd->flags |= LOOKUP_LINK_NOTLAST;
144 err = do_follow_link(next.dentry, nd);
145 + nd->flags &= ~LOOKUP_LINK_NOTLAST;
149 @@ -693,6 +737,11 @@ last_component:
150 inode = nd->dentry->d_inode;
153 + nd->flags |= LOOKUP_LAST;
154 + err = revalidate_special(nd);
155 + nd->flags &= ~LOOKUP_LAST;
160 if (nd->dentry->d_op && nd->dentry->d_op->d_hash) {
161 @@ -700,7 +749,9 @@ last_component:
165 + nd->flags |= LOOKUP_LAST;
166 err = do_lookup(nd, &this, &next);
167 + nd->flags &= ~LOOKUP_LAST;
170 follow_mount(&next.mnt, &next.dentry);
171 @@ -926,7 +977,7 @@ struct dentry * lookup_hash(struct qstr
175 -struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
176 +struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd)
180 @@ -946,11 +997,16 @@ struct dentry * lookup_one_len(const cha
182 this.hash = end_name_hash(hash);
184 - return lookup_hash(&this, base);
185 + return __lookup_hash(&this, base, nd);
187 return ERR_PTR(-EACCES);
190 +struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
192 + return lookup_one_len_it(name, base, len, NULL);
198 @@ -962,11 +1018,12 @@ access:
199 * that namei follows links, while lnamei does not.
202 -int __user_walk(const char __user *name, unsigned flags, struct nameidata *nd)
203 +int __user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd)
205 char *tmp = getname(name);
206 int err = PTR_ERR(tmp);
210 err = path_lookup(tmp, flags, nd);
212 @@ -974,6 +1031,12 @@ int __user_walk(const char __user *name,
216 +int __user_walk(const char __user *name, unsigned flags, struct nameidata *nd)
218 + intent_init(&nd->intent, IT_LOOKUP);
219 + return __user_walk_it(name, flags, nd);
223 * It's inline, so penalty for filesystems that don't use sticky bit is
225 @@ -1246,8 +1309,8 @@ int open_namei(const char * pathname, in
226 acc_mode |= MAY_APPEND;
228 /* Fill in the open() intent data */
229 - nd->intent.open.flags = flag;
230 - nd->intent.open.create_mode = mode;
231 + nd->intent.it_flags = flag;
232 + nd->intent.it_create_mode = mode;
235 * The simplest case - just a plain lookup.
236 @@ -1263,6 +1326,7 @@ int open_namei(const char * pathname, in
238 * Create - we need to know the parent.
240 + nd->intent.it_op |= IT_CREAT;
241 error = path_lookup(pathname, LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE, nd);
244 @@ -1279,7 +1343,9 @@ int open_namei(const char * pathname, in
246 nd->flags &= ~LOOKUP_PARENT;
247 down(&dir->d_inode->i_sem);
248 + nd->flags |= LOOKUP_LAST;
249 dentry = __lookup_hash(&nd->last, nd->dentry, nd);
250 + nd->flags &= ~LOOKUP_LAST;
253 error = PTR_ERR(dentry);
254 @@ -1384,7 +1450,9 @@ do_link:
257 down(&dir->d_inode->i_sem);
258 + nd->flags |= LOOKUP_LAST;
259 dentry = __lookup_hash(&nd->last, nd->dentry, nd);
260 + nd->flags &= ~LOOKUP_LAST;
261 putname(nd->last.name);
264 @@ -2142,7 +2210,9 @@ static inline int
265 __vfs_follow_link(struct nameidata *nd, const char *link)
268 + struct lookup_intent it = nd->intent;
274 @@ -2152,6 +2222,10 @@ __vfs_follow_link(struct nameidata *nd,
275 /* weird __emul_prefix() stuff did it */
279 + intent_init(&nd->intent, it.it_op);
280 + nd->intent.it_flags = it.it_flags;
281 + nd->intent.it_create_mode = it.it_create_mode;
282 res = link_path_walk(link, nd);
284 if (current->link_count || res || nd->last_type!=LAST_NORM)
285 --- linux-2.6.0-test1/fs/namespace.c~vfs_intent_2.6.0-test1 2003-09-13 19:07:44.000000000 +0400
286 +++ linux-2.6.0-test1-alexey/fs/namespace.c 2003-09-14 18:13:44.000000000 +0400
287 @@ -738,6 +738,7 @@ long do_mount(char * dev_name, char * di
291 + intent_init(&nd.intent, IT_LOOKUP);
293 if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
294 flags &= ~MS_MGC_MSK;
295 @@ -947,6 +948,7 @@ void set_fs_pwd(struct fs_struct *fs, st
299 +EXPORT_SYMBOL(set_fs_pwd);
301 static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
303 --- linux-2.6.0-test1/fs/open.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:34.000000000 +0400
304 +++ linux-2.6.0-test1-alexey/fs/open.c 2003-09-14 18:13:44.000000000 +0400
305 @@ -200,7 +200,7 @@ static inline long do_sys_truncate(const
307 struct inode * inode;
310 + intent_init(&nd.intent, IT_GETATTR);
312 if (length < 0) /* sorry, but loff_t says... */
314 @@ -443,6 +443,7 @@ asmlinkage long sys_access(const char __
315 int old_fsuid, old_fsgid;
316 kernel_cap_t old_cap;
318 + intent_init(&nd.intent, IT_GETATTR);
320 if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */
322 @@ -474,6 +475,7 @@ asmlinkage long sys_access(const char __
323 if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode)
324 && !special_file(nd.dentry->d_inode->i_mode))
330 @@ -488,6 +490,7 @@ asmlinkage long sys_chdir(const char __u
334 + intent_init(&nd.intent, IT_GETATTR);
336 error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
338 @@ -539,6 +542,7 @@ asmlinkage long sys_chroot(const char __
342 + intent_init(&nd.intent, IT_GETATTR);
344 error = __user_walk(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
346 @@ -611,7 +615,7 @@ asmlinkage long sys_chmod(const char __u
348 if (IS_RDONLY(inode))
353 if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
355 @@ -719,25 +723,8 @@ asmlinkage long sys_fchown(unsigned int
356 * for the internal routines (ie open_namei()/follow_link() etc). 00 is
359 -struct file *filp_open(const char * filename, int flags, int mode)
361 - int namei_flags, error;
362 - struct nameidata nd;
364 - namei_flags = flags;
365 - if ((namei_flags+1) & O_ACCMODE)
367 - if (namei_flags & O_TRUNC)
370 - error = open_namei(filename, namei_flags, mode, &nd);
372 - return dentry_open(nd.dentry, nd.mnt, flags);
374 - return ERR_PTR(error);
377 -struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags)
378 +struct file *dentry_open_it(struct dentry *dentry, struct vfsmount *mnt, int flags,
379 + struct lookup_intent *it)
383 @@ -749,6 +736,7 @@ struct file *dentry_open(struct dentry *
386 f->f_mode = (flags+1) & O_ACCMODE;
388 inode = dentry->d_inode;
389 if (f->f_mode & FMODE_WRITE) {
390 error = get_write_access(inode);
391 @@ -767,6 +755,7 @@ struct file *dentry_open(struct dentry *
392 error = f->f_op->open(inode,f);
395 + intent_release(it);
397 f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
399 @@ -791,11 +780,42 @@ cleanup_all:
403 + intent_release(it);
406 return ERR_PTR(error);
409 +struct file *filp_open(const char * filename, int flags, int mode)
411 + int namei_flags, error;
412 + struct file * temp_filp;
413 + struct nameidata nd;
414 + intent_init(&nd.intent, IT_OPEN);
416 + namei_flags = flags;
417 + if ((namei_flags+1) & O_ACCMODE)
419 + if (namei_flags & O_TRUNC)
422 + error = open_namei(filename, namei_flags, mode, &nd);
424 + temp_filp = dentry_open_it(nd.dentry, nd.mnt, flags, &nd.intent);
427 + return ERR_PTR(error);
431 +struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags)
433 + struct lookup_intent it;
434 + intent_init(&it, IT_LOOKUP);
436 + return dentry_open_it(dentry, mnt, flags, &it);
440 * Find an empty file descriptor entry, and mark it busy.
442 --- linux-2.6.0-test1/fs/stat.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:11.000000000 +0400
443 +++ linux-2.6.0-test1-alexey/fs/stat.c 2003-09-14 18:13:44.000000000 +0400
444 @@ -33,7 +33,7 @@ void generic_fillattr(struct inode *inod
445 stat->blksize = inode->i_blksize;
448 -int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
449 +int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat)
451 struct inode *inode = dentry->d_inode;
453 @@ -44,6 +44,8 @@ int vfs_getattr(struct vfsmount *mnt, st
455 if (inode->i_op->getattr)
456 return inode->i_op->getattr(mnt, dentry, stat);
457 + if (inode->i_op->getattr_it)
458 + return inode->i_op->getattr_it(mnt, dentry, it, stat);
460 generic_fillattr(inode, stat);
461 if (!stat->blksize) {
462 @@ -56,14 +58,20 @@ int vfs_getattr(struct vfsmount *mnt, st
466 +int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
468 + return vfs_getattr_it(mnt, dentry, NULL, stat);
471 int vfs_stat(char __user *name, struct kstat *stat)
475 + intent_init(&nd.intent, IT_GETATTR);
477 - error = user_path_walk(name, &nd);
478 + error = user_path_walk_it(name, &nd);
480 - error = vfs_getattr(nd.mnt, nd.dentry, stat);
481 + error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
485 @@ -73,10 +81,11 @@ int vfs_lstat(char __user *name, struct
489 + intent_init(&nd.intent, IT_GETATTR);
491 - error = user_path_walk_link(name, &nd);
492 + error = user_path_walk_link_it(name, &nd);
494 - error = vfs_getattr(nd.mnt, nd.dentry, stat);
495 + error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
499 @@ -86,9 +95,12 @@ int vfs_fstat(unsigned int fd, struct ks
501 struct file *f = fget(fd);
503 + struct nameidata nd;
504 + intent_init(&nd.intent, IT_GETATTR);
507 - error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat);
508 + error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat);
509 + intent_release(&nd.intent);
513 --- linux-2.6.0-test1/include/linux/dcache.h~vfs_intent_2.6.0-test1 2003-09-13 19:08:13.000000000 +0400
514 +++ linux-2.6.0-test1-alexey/include/linux/dcache.h 2003-09-14 18:13:44.000000000 +0400
518 #include <asm/atomic.h>
519 +#include <linux/string.h>
520 #include <linux/list.h>
521 #include <linux/spinlock.h>
522 #include <linux/cache.h>
523 @@ -35,6 +36,8 @@ struct qstr {
527 +#include <linux/namei.h>
529 struct dentry_stat_t {
532 --- linux-2.6.0-test1/include/linux/fs.h~vfs_intent_2.6.0-test1 2003-09-13 19:08:41.000000000 +0400
533 +++ linux-2.6.0-test1-alexey/include/linux/fs.h 2003-09-14 18:13:44.000000000 +0400
534 @@ -240,6 +240,8 @@ typedef void (dio_iodone_t)(struct inode
535 #define ATTR_ATTR_FLAG 1024
536 #define ATTR_KILL_SUID 2048
537 #define ATTR_KILL_SGID 4096
538 +#define ATTR_RAW 8192 /* file system, not vfs will massage attrs */
539 +#define ATTR_FROM_OPEN 16384 /* called from open path, ie O_TRUNC */
542 * This is the Inode Attributes structure, used for notify_change(). It
543 @@ -399,6 +401,7 @@ struct inode {
544 struct block_device *i_bdev;
547 + void *i_filterdata;
549 unsigned long i_dnotify_mask; /* Directory notify events */
550 struct dnotify_struct *i_dnotify; /* for directory notifications */
551 @@ -514,6 +517,7 @@ struct file {
552 /* Used by fs/eventpoll.c to link all the hooks to this file */
553 struct list_head f_ep_links;
554 spinlock_t f_ep_lock;
555 + struct lookup_intent *f_it;
557 extern spinlock_t files_lock;
558 #define file_list_lock() spin_lock(&files_lock);
559 @@ -814,7 +818,9 @@ struct inode_operations {
560 void (*truncate) (struct inode *);
561 int (*permission) (struct inode *, int, struct nameidata *);
562 int (*setattr) (struct dentry *, struct iattr *);
563 + int (*setattr_raw) (struct inode *, struct iattr *);
564 int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
565 + int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *);
566 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
567 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
568 ssize_t (*listxattr) (struct dentry *, char *, size_t);
569 @@ -1027,6 +1033,7 @@ extern int register_filesystem(struct fi
570 extern int unregister_filesystem(struct file_system_type *);
571 extern struct vfsmount *kern_mount(struct file_system_type *);
572 extern int may_umount(struct vfsmount *);
573 +struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data);
574 extern long do_mount(char *, char *, char *, unsigned long, void *);
576 extern int vfs_statfs(struct super_block *, struct kstatfs *);
577 @@ -1094,6 +1101,7 @@ extern int do_truncate(struct dentry *,
579 extern struct file *filp_open(const char *, int, int);
580 extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
581 +extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *);
582 extern int filp_close(struct file *, fl_owner_t id);
583 extern char * getname(const char __user *);
585 --- linux-2.6.0-test1/include/linux/namei.h~vfs_intent_2.6.0-test1 2003-07-24 15:52:31.000000000 +0400
586 +++ linux-2.6.0-test1-alexey/include/linux/namei.h 2003-09-14 18:13:44.000000000 +0400
588 #define _LINUX_NAMEI_H
590 #include <linux/linkage.h>
591 +#include <linux/string.h>
596 -struct open_intent {
599 +/* intent opcodes */
601 +#define IT_CREAT (1<<1)
602 +#define IT_READDIR (1<<2)
603 +#define IT_GETATTR (1<<3)
604 +#define IT_LOOKUP (1<<4)
605 +#define IT_UNLINK (1<<5)
606 +#define IT_TRUNC (1<<6)
607 +#define IT_GETXATTR (1<<7)
609 +struct lustre_intent_data {
610 + int it_disposition;
612 + __u64 it_lock_handle;
617 +#define INTENT_MAGIC 0x19620323
618 +struct lookup_intent {
620 + void (*it_op_release)(struct lookup_intent *);
623 + int it_create_mode;
625 + struct lustre_intent_data lustre;
629 +static inline void intent_init(struct lookup_intent *it, int op)
631 + memset(it, 0, sizeof(*it));
632 + it->it_magic = INTENT_MAGIC;
637 struct dentry *dentry;
638 struct vfsmount *mnt;
645 - struct open_intent open;
647 + struct lookup_intent intent;
651 @@ -41,6 +71,9 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA
652 #define LOOKUP_CONTINUE 4
653 #define LOOKUP_PARENT 16
654 #define LOOKUP_NOALT 32
655 +#define LOOKUP_LAST (1<<6)
656 +#define LOOKUP_LINK_NOTLAST (1<<7)
661 @@ -49,6 +82,12 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA
662 #define LOOKUP_ACCESS (0x0400)
664 extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *));
665 +extern int FASTCALL(__user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd));
666 +#define user_path_walk_it(name,nd) \
667 + __user_walk_it(name, LOOKUP_FOLLOW, nd)
668 +#define user_path_walk_link_it(name,nd) \
669 + __user_walk_it(name, 0, nd)
670 +extern void intent_release(struct lookup_intent *);
671 #define user_path_walk(name,nd) \
672 __user_walk(name, LOOKUP_FOLLOW, nd)
673 #define user_path_walk_link(name,nd) \
674 @@ -60,7 +99,6 @@ extern void path_release(struct nameidat
676 extern struct dentry * lookup_one_len(const char *, struct dentry *, int);
677 extern struct dentry * lookup_hash(struct qstr *, struct dentry *);
679 extern int follow_down(struct vfsmount **, struct dentry **);
680 extern int follow_up(struct vfsmount **, struct dentry **);
682 --- linux-2.6.0-test1/kernel/ksyms.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:42.000000000 +0400
683 +++ linux-2.6.0-test1-alexey/kernel/ksyms.c 2003-09-14 18:13:44.000000000 +0400
684 @@ -382,6 +382,7 @@ EXPORT_SYMBOL(unregister_filesystem);
685 EXPORT_SYMBOL(kern_mount);
686 EXPORT_SYMBOL(__mntput);
687 EXPORT_SYMBOL(may_umount);
688 +EXPORT_SYMBOL(reparent_to_init);
690 /* executable format registration */
691 EXPORT_SYMBOL(register_binfmt);
692 @@ -409,6 +410,12 @@ EXPORT_SYMBOL(proc_doulongvec_minmax);
693 EXPORT_SYMBOL(request_irq);
694 EXPORT_SYMBOL(free_irq);
697 +EXPORT_SYMBOL(do_kern_mount);
698 +EXPORT_SYMBOL(exit_files);
699 +//EXPORT_SYMBOL(kmem_cache_validate);
702 /* waitqueue handling */
703 EXPORT_SYMBOL(add_wait_queue);
704 EXPORT_SYMBOL(add_wait_queue_exclusive);
705 @@ -558,6 +565,7 @@ EXPORT_SYMBOL(sys_tz);
706 EXPORT_SYMBOL(file_fsync);
707 EXPORT_SYMBOL(fsync_buffers_list);
708 EXPORT_SYMBOL(clear_inode);
709 +EXPORT_SYMBOL(__iget);
710 EXPORT_SYMBOL(init_special_inode);
711 EXPORT_SYMBOL(new_inode);
712 EXPORT_SYMBOL(__insert_inode_hash);
713 --- linux-2.6.0-test1/fs/nfs/dir.c~vfs_intent_2.6.0-test1 2003-09-13 19:08:34.000000000 +0400
714 +++ linux-2.6.0-test1-alexey/fs/nfs/dir.c 2003-09-14 18:13:44.000000000 +0400
715 @@ -652,7 +652,7 @@ int nfs_is_exclusive_create(struct inode
717 if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE))
719 - return (nd->intent.open.flags & O_EXCL) != 0;
720 + return (nd->intent.it_flags & O_EXCL) != 0;
723 static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
724 @@ -825,7 +825,7 @@ static int nfs_create(struct inode *dir,
725 attr.ia_valid = ATTR_MODE;
727 if (nd && (nd->flags & LOOKUP_CREATE))
728 - open_flags = nd->intent.open.flags;
729 + open_flags = nd->intent.it_flags;
732 * The 0 argument passed into the create function should one day