1 Index: linux-2.6.10/fs/cifs/dir.c
2 ===================================================================
3 --- linux-2.6.10.orig/fs/cifs/dir.c
4 +++ linux-2.6.10/fs/cifs/dir.c
5 @@ -199,23 +199,23 @@ cifs_create(struct inode *inode, struct
9 - if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY)
10 + if ((nd->intent.it_flags & O_ACCMODE) == O_RDONLY)
11 desiredAccess = GENERIC_READ;
12 - else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY) {
13 + else if ((nd->intent.it_flags & O_ACCMODE) == O_WRONLY) {
14 desiredAccess = GENERIC_WRITE;
16 - } else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR) {
17 + } else if ((nd->intent.it_flags & O_ACCMODE) == O_RDWR) {
18 /* GENERIC_ALL is too much permission to request */
19 /* can cause unnecessary access denied on create */
20 /* desiredAccess = GENERIC_ALL; */
21 desiredAccess = GENERIC_READ | GENERIC_WRITE;
24 - if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
25 + if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
26 disposition = FILE_CREATE;
27 - else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
28 + else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
29 disposition = FILE_OVERWRITE_IF;
30 - else if((nd->intent.open.flags & O_CREAT) == O_CREAT)
31 + else if((nd->intent.it_flags & O_CREAT) == O_CREAT)
32 disposition = FILE_OPEN_IF;
34 cFYI(1,("Create flag not set in create function"));
35 Index: linux-2.6.10/fs/nfs/nfs4proc.c
36 ===================================================================
37 --- linux-2.6.10.orig/fs/nfs/nfs4proc.c
38 +++ linux-2.6.10/fs/nfs/nfs4proc.c
39 @@ -775,17 +775,17 @@ nfs4_atomic_open(struct inode *dir, stru
40 struct nfs4_state *state;
42 if (nd->flags & LOOKUP_CREATE) {
43 - attr.ia_mode = nd->intent.open.create_mode;
44 + attr.ia_mode = nd->intent.it_create_mode;
45 attr.ia_valid = ATTR_MODE;
46 if (!IS_POSIXACL(dir))
47 attr.ia_mode &= ~current->fs->umask;
50 - BUG_ON(nd->intent.open.flags & O_CREAT);
51 + BUG_ON(nd->intent.it_flags & O_CREAT);
54 cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
55 - state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred);
56 + state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred);
59 return (struct inode *)state;
60 Index: linux-2.6.10/fs/nfs/dir.c
61 ===================================================================
62 --- linux-2.6.10.orig/fs/nfs/dir.c
63 +++ linux-2.6.10/fs/nfs/dir.c
64 @@ -718,7 +718,7 @@ int nfs_is_exclusive_create(struct inode
66 if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE))
68 - return (nd->intent.open.flags & O_EXCL) != 0;
69 + return (nd->intent.it_flags & O_EXCL) != 0;
72 static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
73 @@ -791,7 +791,7 @@ static int is_atomic_open(struct inode *
74 if (nd->flags & LOOKUP_DIRECTORY)
76 /* Are we trying to write to a read only partition? */
77 - if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
78 + if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
82 @@ -812,7 +812,7 @@ static struct dentry *nfs_atomic_lookup(
83 dentry->d_op = NFS_PROTO(dir)->dentry_ops;
85 /* Let vfs_create() deal with O_EXCL */
86 - if (nd->intent.open.flags & O_EXCL)
87 + if (nd->intent.it_flags & O_EXCL)
90 /* Open the file on the server */
91 @@ -820,7 +820,7 @@ static struct dentry *nfs_atomic_lookup(
92 /* Revalidate parent directory attribute cache */
93 nfs_revalidate_inode(NFS_SERVER(dir), dir);
95 - if (nd->intent.open.flags & O_CREAT) {
96 + if (nd->intent.it_flags & O_CREAT) {
97 nfs_begin_data_update(dir);
98 inode = nfs4_atomic_open(dir, dentry, nd);
99 nfs_end_data_update(dir);
100 @@ -836,7 +836,7 @@ static struct dentry *nfs_atomic_lookup(
102 /* This turned out not to be a regular file */
104 - if (!(nd->intent.open.flags & O_NOFOLLOW))
105 + if (!(nd->intent.it_flags & O_NOFOLLOW))
109 @@ -875,7 +875,7 @@ static int nfs_open_revalidate(struct de
110 /* NFS only supports OPEN on regular files */
111 if (!S_ISREG(inode->i_mode))
113 - openflags = nd->intent.open.flags;
114 + openflags = nd->intent.it_flags;
115 /* We cannot do exclusive creation on a positive dentry */
116 if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
118 @@ -1043,7 +1043,8 @@ static int nfs_create(struct inode *dir,
119 attr.ia_valid = ATTR_MODE;
121 if (nd && (nd->flags & LOOKUP_CREATE))
122 - open_flags = nd->intent.open.flags;
123 + open_flags = nd->intent.it_flags;
127 * The 0 argument passed into the create function should one day