1 Index: linux-2.6.7-vanilla/fs/nfs/dir.c
2 ===================================================================
3 --- linux-2.6.7-vanilla.orig/fs/nfs/dir.c 2004-07-01 12:24:53.588555336 +0300
4 +++ linux-2.6.7-vanilla/fs/nfs/dir.c 2004-07-01 12:37:42.595648488 +0300
6 if (nd->flags & LOOKUP_DIRECTORY)
8 /* Are we trying to write to a read only partition? */
9 - if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
10 + if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
15 dentry->d_op = NFS_PROTO(dir)->dentry_ops;
17 /* Let vfs_create() deal with O_EXCL */
18 - if (nd->intent.open.flags & O_EXCL)
19 + if (nd->intent.it_flags & O_EXCL)
22 /* Open the file on the server */
24 /* Revalidate parent directory attribute cache */
25 nfs_revalidate_inode(NFS_SERVER(dir), dir);
27 - if (nd->intent.open.flags & O_CREAT) {
28 + if (nd->intent.it_flags & O_CREAT) {
29 nfs_begin_data_update(dir);
30 inode = nfs4_atomic_open(dir, dentry, nd);
31 nfs_end_data_update(dir);
34 /* This turned out not to be a regular file */
36 - if (!(nd->intent.open.flags & O_NOFOLLOW))
37 + if (!(nd->intent.it_flags & O_NOFOLLOW))
42 dir = parent->d_inode;
43 if (!is_atomic_open(dir, nd))
45 - openflags = nd->intent.open.flags;
46 + openflags = nd->intent.it_flags;
47 if (openflags & O_CREAT) {
48 /* If this is a negative dentry, just drop it */
50 Index: linux-2.6.7-vanilla/fs/nfs/nfs4proc.c
51 ===================================================================
52 --- linux-2.6.7-vanilla.orig/fs/nfs/nfs4proc.c 2004-07-01 12:09:22.000000000 +0300
53 +++ linux-2.6.7-vanilla/fs/nfs/nfs4proc.c 2004-07-01 12:37:42.598648032 +0300
55 struct nfs4_state *state;
57 if (nd->flags & LOOKUP_CREATE) {
58 - attr.ia_mode = nd->intent.open.create_mode;
59 + attr.ia_mode = nd->intent.it_create_mode;
60 attr.ia_valid = ATTR_MODE;
61 if (!IS_POSIXACL(dir))
62 attr.ia_mode &= ~current->fs->umask;
65 - BUG_ON(nd->intent.open.flags & O_CREAT);
66 + BUG_ON(nd->intent.it_flags & O_CREAT);
69 cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
70 - state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred);
71 + state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred);
74 return (struct inode *)state;
75 Index: linux-2.6.7-vanilla/fs/cifs/dir.c
76 ===================================================================
77 --- linux-2.6.7-vanilla.orig/fs/cifs/dir.c 2004-07-01 12:09:20.000000000 +0300
78 +++ linux-2.6.7-vanilla/fs/cifs/dir.c 2004-07-01 12:38:17.695312528 +0300
83 - if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY)
84 + if ((nd->intent.it_flags & O_ACCMODE) == O_RDONLY)
85 desiredAccess = GENERIC_READ;
86 - else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY) {
87 + else if ((nd->intent.it_flags & O_ACCMODE) == O_WRONLY) {
88 desiredAccess = GENERIC_WRITE;
90 - } else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR) {
91 + } else if ((nd->intent.it_flags & O_ACCMODE) == O_RDWR) {
92 /* GENERIC_ALL is too much permission to request */
93 /* can cause unnecessary access denied on create */
94 /* desiredAccess = GENERIC_ALL; */
95 desiredAccess = GENERIC_READ | GENERIC_WRITE;
98 - if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
99 + if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
100 disposition = FILE_CREATE;
101 - else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
102 + else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
103 disposition = FILE_OVERWRITE_IF;
104 - else if((nd->intent.open.flags & O_CREAT) == O_CREAT)
105 + else if((nd->intent.it_flags & O_CREAT) == O_CREAT)
106 disposition = FILE_OPEN_IF;
108 cFYI(1,("Create flag not set in create function"));
110 parent_dir_inode, direntry->d_name.name, direntry));
112 if(nd) { /* BB removeme */
113 - cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.open.flags));
114 + cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.it_flags));
115 } /* BB removeme BB */
116 /* BB Add check of incoming data - e.g. frame not longer than maximum SMB - let server check the namelen BB */