1 Index: linux-2.6.12-rc6/fs/nfs/dir.c
2 ===================================================================
3 --- linux-2.6.12-rc6.orig/fs/nfs/dir.c 2005-06-14 14:22:14.585699648 +0200
4 +++ linux-2.6.12-rc6/fs/nfs/dir.c 2005-06-14 14:26:39.884524523 +0200
7 if (nd == NULL || nfs_lookup_check_intent(nd, LOOKUP_CREATE) == 0)
9 - return (nd->intent.open.flags & O_EXCL) != 0;
10 + return (nd->intent.it_flags & O_EXCL) != 0;
13 static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
15 if (nd->flags & LOOKUP_DIRECTORY)
17 /* Are we trying to write to a read only partition? */
18 - if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
19 + if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
24 dentry->d_op = NFS_PROTO(dir)->dentry_ops;
26 /* Let vfs_create() deal with O_EXCL */
27 - if (nd->intent.open.flags & O_EXCL)
28 + if (nd->intent.it_flags & O_EXCL)
31 /* Open the file on the server */
36 - if (nd->intent.open.flags & O_CREAT) {
37 + if (nd->intent.it_flags & O_CREAT) {
38 nfs_begin_data_update(dir);
39 inode = nfs4_atomic_open(dir, dentry, nd);
40 nfs_end_data_update(dir);
43 /* This turned out not to be a regular file */
45 - if (!(nd->intent.open.flags & O_NOFOLLOW))
46 + if (!(nd->intent.it_flags & O_NOFOLLOW))
51 /* NFS only supports OPEN on regular files */
52 if (!S_ISREG(inode->i_mode))
54 - openflags = nd->intent.open.flags;
55 + openflags = nd->intent.it_flags;
56 /* We cannot do exclusive creation on a positive dentry */
57 if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
60 attr.ia_valid = ATTR_MODE;
62 if (nd && (nd->flags & LOOKUP_CREATE))
63 - open_flags = nd->intent.open.flags;
64 + open_flags = nd->intent.it_flags;
67 nfs_begin_data_update(dir);
68 Index: linux-2.6.12-rc6/fs/nfs/nfs4proc.c
69 ===================================================================
70 --- linux-2.6.12-rc6.orig/fs/nfs/nfs4proc.c 2005-06-06 17:22:29.000000000 +0200
71 +++ linux-2.6.12-rc6/fs/nfs/nfs4proc.c 2005-06-14 14:30:18.499756220 +0200
73 struct nfs4_state *state;
75 if (nd->flags & LOOKUP_CREATE) {
76 - attr.ia_mode = nd->intent.open.create_mode;
77 + attr.ia_mode = nd->intent.it_create_mode;
78 attr.ia_valid = ATTR_MODE;
79 if (!IS_POSIXACL(dir))
80 attr.ia_mode &= ~current->fs->umask;
83 - BUG_ON(nd->intent.open.flags & O_CREAT);
84 + BUG_ON(nd->intent.it_flags & O_CREAT);
87 cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
89 return (struct inode *)cred;
90 - state = nfs4_do_open(dir, dentry, nd->intent.open.flags, &attr, cred);
91 + state = nfs4_do_open(dir, dentry, nd->intent.it_flags, &attr, cred);
94 return (struct inode *)state;
95 Index: linux-2.6.12-rc6/fs/cifs/dir.c
96 ===================================================================
97 --- linux-2.6.12-rc6.orig/fs/cifs/dir.c 2005-06-06 17:22:29.000000000 +0200
98 +++ linux-2.6.12-rc6/fs/cifs/dir.c 2005-06-14 14:26:39.915774522 +0200
103 - if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY)
104 + if ((nd->intent.it_flags & O_ACCMODE) == O_RDONLY)
105 desiredAccess = GENERIC_READ;
106 - else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY) {
107 + else if ((nd->intent.it_flags & O_ACCMODE) == O_WRONLY) {
108 desiredAccess = GENERIC_WRITE;
110 - } else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR) {
111 + } else if ((nd->intent.it_flags & O_ACCMODE) == O_RDWR) {
112 /* GENERIC_ALL is too much permission to request */
113 /* can cause unnecessary access denied on create */
114 /* desiredAccess = GENERIC_ALL; */
115 desiredAccess = GENERIC_READ | GENERIC_WRITE;
118 - if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
119 + if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
120 disposition = FILE_CREATE;
121 - else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
122 + else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
123 disposition = FILE_OVERWRITE_IF;
124 - else if((nd->intent.open.flags & O_CREAT) == O_CREAT)
125 + else if((nd->intent.it_flags & O_CREAT) == O_CREAT)
126 disposition = FILE_OPEN_IF;
128 cFYI(1,("Create flag not set in create function"));