1 Index: linux-2.6.5-7.108/fs/nfs/dir.c
2 ===================================================================
3 --- linux-2.6.5-7.108.orig/fs/nfs/dir.c 2004-09-15 19:26:43.012732408 +0300
4 +++ linux-2.6.5-7.108/fs/nfs/dir.c 2004-09-15 20:03:32.882781096 +0300
7 if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE))
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 */
33 /* Revalidate parent directory attribute cache */
34 nfs_revalidate_inode(NFS_SERVER(dir), dir);
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 dir = parent->d_inode;
52 if (!is_atomic_open(dir, nd))
54 - openflags = nd->intent.open.flags;
55 + openflags = nd->intent.it_flags;
56 if (openflags & O_CREAT) {
57 /* If this is a negative dentry, just drop it */
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 * The 0 argument passed into the create function should one day
68 Index: linux-2.6.5-7.108/fs/nfs/nfs4proc.c
69 ===================================================================
70 --- linux-2.6.5-7.108.orig/fs/nfs/nfs4proc.c 2004-04-04 06:37:39.000000000 +0300
71 +++ linux-2.6.5-7.108/fs/nfs/nfs4proc.c 2004-09-15 20:03:32.885780640 +0300
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);
88 - state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred);
89 + state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred);
92 return (struct inode *)state;
93 Index: linux-2.6.5-7.108/fs/cifs/dir.c
94 ===================================================================
95 --- linux-2.6.5-7.108.orig/fs/cifs/dir.c 2004-09-04 13:28:22.000000000 +0300
96 +++ linux-2.6.5-7.108/fs/cifs/dir.c 2004-09-15 20:03:40.065689128 +0300
101 - if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY)
102 + if ((nd->intent.it_flags & O_ACCMODE) == O_RDONLY)
103 desiredAccess = GENERIC_READ;
104 - else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY) {
105 + else if ((nd->intent.it_flags & O_ACCMODE) == O_WRONLY) {
106 desiredAccess = GENERIC_WRITE;
108 - } else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR) {
109 + } else if ((nd->intent.it_flags & O_ACCMODE) == O_RDWR) {
110 /* GENERIC_ALL is too much permission to request */
111 /* can cause unnecessary access denied on create */
112 /* desiredAccess = GENERIC_ALL; */
113 desiredAccess = GENERIC_READ | GENERIC_WRITE;
116 - if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
117 + if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
118 disposition = FILE_CREATE;
119 - else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
120 + else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
121 disposition = FILE_OVERWRITE_IF;
122 - else if((nd->intent.open.flags & O_CREAT) == O_CREAT)
123 + else if((nd->intent.it_flags & O_CREAT) == O_CREAT)
124 disposition = FILE_OPEN_IF;
126 cFYI(1,("Create flag not set in create function"));
128 parent_dir_inode, direntry->d_name.name, direntry));
130 if(nd) { /* BB removeme */
131 - cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.open.flags));
132 + cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.it_flags));
133 } /* BB removeme BB */
134 /* BB Add check of incoming data - e.g. frame not longer than maximum SMB - let server check the namelen BB */