1 diff -urp a/fs/cifs/dir.c b/fs/cifs/dir.c
2 --- a/fs/cifs/dir.c 2006-03-10 18:50:15.000000000 -0800
3 +++ b/fs/cifs/dir.c 2006-03-10 18:50:44.000000000 -0800
4 @@ -146,23 +146,23 @@ cifs_create(struct inode *inode, struct
8 - if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY)
9 + if ((nd->intent.it_flags & O_ACCMODE) == O_RDONLY)
10 desiredAccess = GENERIC_READ;
11 - else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY) {
12 + else if ((nd->intent.it_flags & O_ACCMODE) == O_WRONLY) {
13 desiredAccess = GENERIC_WRITE;
15 - } else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR) {
16 + } else if ((nd->intent.it_flags & O_ACCMODE) == O_RDWR) {
17 /* GENERIC_ALL is too much permission to request */
18 /* can cause unnecessary access denied on create */
19 /* desiredAccess = GENERIC_ALL; */
20 desiredAccess = GENERIC_READ | GENERIC_WRITE;
23 - if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
24 + if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
25 disposition = FILE_CREATE;
26 - else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
27 + else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
28 disposition = FILE_OVERWRITE_IF;
29 - else if((nd->intent.open.flags & O_CREAT) == O_CREAT)
30 + else if((nd->intent.it_flags & O_CREAT) == O_CREAT)
31 disposition = FILE_OPEN_IF;
33 cFYI(1,("Create flag not set in create function"));
34 diff -urp a/fs/nfs/dir.c b/fs/nfs/dir.c
35 --- a/fs/nfs/dir.c 2006-03-10 19:07:50.000000000 -0800
36 +++ b/fs/nfs/dir.c 2006-03-10 17:27:15.000000000 -0800
37 @@ -752,7 +752,7 @@ int nfs_is_exclusive_create(struct inode
39 if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE))
41 - return (nd->intent.open.flags & O_EXCL) != 0;
42 + return (nd->intent.it_flags & O_EXCL) != 0;
45 static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
46 @@ -827,7 +827,7 @@ static int is_atomic_open(struct inode *
47 if (nd->flags & LOOKUP_DIRECTORY)
49 /* Are we trying to write to a read only partition? */
50 - if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
51 + if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
55 @@ -848,7 +848,7 @@ static struct dentry *nfs_atomic_lookup(
56 dentry->d_op = NFS_PROTO(dir)->dentry_ops;
58 /* Let vfs_create() deal with O_EXCL */
59 - if (nd->intent.open.flags & O_EXCL)
60 + if (nd->intent.it_flags & O_EXCL)
63 /* Open the file on the server */
64 @@ -860,7 +860,7 @@ static struct dentry *nfs_atomic_lookup(
68 - if (nd->intent.open.flags & O_CREAT) {
69 + if (nd->intent.it_flags & O_CREAT) {
70 nfs_begin_data_update(dir);
71 inode = nfs4_atomic_open(dir, dentry, nd);
72 nfs_end_data_update(dir);
73 @@ -876,7 +876,7 @@ static struct dentry *nfs_atomic_lookup(
75 /* This turned out not to be a regular file */
77 - if (!(nd->intent.open.flags & O_NOFOLLOW))
78 + if (!(nd->intent.it_flags & O_NOFOLLOW))
82 @@ -915,7 +915,7 @@ static int nfs_open_revalidate(struct de
83 /* NFS only supports OPEN on regular files */
84 if (!S_ISREG(inode->i_mode))
86 - openflags = nd->intent.open.flags;
87 + openflags = nd->intent.it_flags;
88 /* We cannot do exclusive creation on a positive dentry */
89 if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
91 @@ -1080,7 +1080,7 @@ static int nfs_create(struct inode *dir,
92 attr.ia_valid = ATTR_MODE;
94 if (nd && (nd->flags & LOOKUP_CREATE))
95 - open_flags = nd->intent.open.flags;
96 + open_flags = nd->intent.it_flags;
99 * The 0 argument passed into the create function should one day
100 diff -urp a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
101 --- a/fs/nfs/nfs4proc.c 2006-03-10 17:19:45.000000000 -0800
102 +++ b/fs/nfs/nfs4proc.c 2006-03-10 17:19:58.000000000 -0800
103 @@ -776,17 +776,17 @@ nfs4_atomic_open(struct inode *dir, stru
104 struct nfs4_state *state;
106 if (nd->flags & LOOKUP_CREATE) {
107 - attr.ia_mode = nd->intent.open.create_mode;
108 + attr.ia_mode = nd->intent.it_create_mode;
109 attr.ia_valid = ATTR_MODE;
110 if (!IS_POSIXACL(dir))
111 attr.ia_mode &= ~current->fs->umask;
114 - BUG_ON(nd->intent.open.flags & O_CREAT);
115 + BUG_ON(nd->intent.it_flags & O_CREAT);
118 cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
119 - state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred);
120 + state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred);
123 return (struct inode *)state;