1 .old..........pc/linux-2.6.3-nfs-intent-suse/fs/nfs/dir.c
2 .new.........fs/nfs/dir.c
3 .old..........pc/linux-2.6.3-nfs-intent-suse/fs/nfs/dir.c
4 .new.........fs/nfs/dir.c
5 Index: linux-2.6.4-51.0/fs/nfs/dir.c
6 ===================================================================
7 --- linux-2.6.4-51.0.orig/fs/nfs/dir.c 2004-04-05 17:09:16.000000000 -0400
8 +++ linux-2.6.4-51.0/fs/nfs/dir.c 2004-04-05 17:09:23.000000000 -0400
10 if (nd->flags & LOOKUP_DIRECTORY)
12 /* Are we trying to write to a read only partition? */
13 - if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
14 + if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
19 dentry->d_op = NFS_PROTO(dir)->dentry_ops;
21 /* Let vfs_create() deal with O_EXCL */
22 - if (nd->intent.open.flags & O_EXCL)
23 + if (nd->intent.it_flags & O_EXCL)
26 /* Open the file on the server */
28 /* Revalidate parent directory attribute cache */
29 nfs_revalidate_inode(NFS_SERVER(dir), dir);
31 - if (nd->intent.open.flags & O_CREAT) {
32 + if (nd->intent.it_flags & O_CREAT) {
33 nfs_begin_data_update(dir);
34 inode = nfs4_atomic_open(dir, dentry, nd);
35 nfs_end_data_update(dir);
38 /* This turned out not to be a regular file */
40 - if (!(nd->intent.open.flags & O_NOFOLLOW))
41 + if (!(nd->intent.it_flags & O_NOFOLLOW))
46 dir = parent->d_inode;
47 if (!is_atomic_open(dir, nd))
49 - openflags = nd->intent.open.flags;
50 + openflags = nd->intent.it_flags;
51 if (openflags & O_CREAT) {
52 /* If this is a negative dentry, just drop it */
54 Index: linux-2.6.4-51.0/fs/nfs/nfs4proc.c
55 ===================================================================
56 --- linux-2.6.4-51.0.orig/fs/nfs/nfs4proc.c 2004-04-05 12:41:59.000000000 -0400
57 +++ linux-2.6.4-51.0/fs/nfs/nfs4proc.c 2004-04-05 17:09:23.000000000 -0400
59 struct nfs4_state *state;
61 if (nd->flags & LOOKUP_CREATE) {
62 - attr.ia_mode = nd->intent.open.create_mode;
63 + attr.ia_mode = nd->intent.it_create_mode;
64 attr.ia_valid = ATTR_MODE;
65 if (!IS_POSIXACL(dir))
66 attr.ia_mode &= ~current->fs->umask;
69 - BUG_ON(nd->intent.open.flags & O_CREAT);
70 + BUG_ON(nd->intent.it_flags & O_CREAT);
73 cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
74 - state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred);
75 + state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred);
78 return (struct inode *)state;
79 Index: linux-2.6.4-51.0/fs/cifs/dir.c
80 ===================================================================
81 --- linux-2.6.4-51.0.orig/fs/cifs/dir.c 2004-04-05 12:41:59.000000000 -0400
82 +++ linux-2.6.4-51.0/fs/cifs/dir.c 2004-04-05 17:13:47.000000000 -0400
85 cFYI(1,("In create for inode %p dentry->inode %p nd flags = 0x%x for %s",inode, direntry->d_inode, nd->flags,full_path));
87 - if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY)
88 + if ((nd->intent.it_flags & O_ACCMODE) == O_RDONLY)
89 desiredAccess = GENERIC_READ;
90 - else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY)
91 + else if ((nd->intent.it_flags & O_ACCMODE) == O_WRONLY)
92 desiredAccess = GENERIC_WRITE;
93 - else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR) {
94 + else if ((nd->intent.it_flags & O_ACCMODE) == O_RDWR) {
95 /* GENERIC_ALL is too much permission to request */
96 /* can cause unnecessary access denied on create */
97 /* desiredAccess = GENERIC_ALL; */
98 desiredAccess = GENERIC_READ | GENERIC_WRITE;
101 - if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
102 + if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
103 disposition = FILE_CREATE;
104 - else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
105 + else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
106 disposition = FILE_OVERWRITE_IF;
107 - else if((nd->intent.open.flags & O_CREAT) == O_CREAT)
108 + else if((nd->intent.it_flags & O_CREAT) == O_CREAT)
109 disposition = FILE_OPEN_IF;
111 cFYI(1,("Create flag not set in create function"));
113 parent_dir_inode, direntry->d_name.name, direntry));
115 if(nd) { /* BB removeme */
116 - cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.open.flags));
117 + cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.it_flags));
118 } /* BB removeme BB */
119 /* BB Add check of incoming data - e.g. frame not longer than maximum SMB - let server check the namelen BB */