Whamcloud - gitweb
- mds->lmv->mdc propagate lower timeout down to import
[fs/lustre-release.git] / lustre / kernel_patches / patches / nfs-cifs-intent-2.6.3-suse.patch
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.3-20/fs/nfs/dir.c
6 ===================================================================
7 --- linux-2.6.3-20.orig/fs/nfs/dir.c    2004-03-08 14:23:40.000000000 -0800
8 +++ linux-2.6.3-20/fs/nfs/dir.c 2004-03-08 17:07:34.000000000 -0800
9 @@ -751,7 +751,7 @@
10         if (nd->flags & LOOKUP_DIRECTORY)
11                 return 0;
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)))
15                 return 0;
16         return 1;
17  }
18 @@ -772,7 +772,7 @@
19         dentry->d_op = NFS_PROTO(dir)->dentry_ops;
20  
21         /* Let vfs_create() deal with O_EXCL */
22 -       if (nd->intent.open.flags & O_EXCL)
23 +       if (nd->intent.it_flags & O_EXCL)
24                 goto no_entry;
25  
26         /* Open the file on the server */
27 @@ -788,7 +788,7 @@
28                                 break;
29                         /* This turned out not to be a regular file */
30                         case -ELOOP:
31 -                               if (!(nd->intent.open.flags & O_NOFOLLOW))
32 +                               if (!(nd->intent.it_flags & O_NOFOLLOW))
33                                         goto no_open;
34                         /* case -EISDIR: */
35                         /* case -EINVAL: */
36 @@ -818,7 +818,7 @@
37         parent = dget_parent(dentry);
38         if (!is_atomic_open(parent->d_inode, nd))
39                 goto no_open;
40 -       openflags = nd->intent.open.flags;
41 +       openflags = nd->intent.it_flags;
42         if (openflags & O_CREAT) {
43                 /* If this is a negative dentry, just drop it */
44                 if (!inode)
45 .old..........pc/linux-2.6.3-nfs-intent-suse/fs/nfs/nfs4proc.c
46 .new.........fs/nfs/nfs4proc.c
47 Index: linux-2.6.3-20/fs/nfs/nfs4proc.c
48 ===================================================================
49 --- linux-2.6.3-20.orig/fs/nfs/nfs4proc.c       2004-03-05 02:07:03.000000000 -0800
50 +++ linux-2.6.3-20/fs/nfs/nfs4proc.c    2004-03-08 17:07:34.000000000 -0800
51 @@ -778,17 +778,17 @@
52         struct nfs4_state *state;
53  
54         if (nd->flags & LOOKUP_CREATE) {
55 -               attr.ia_mode = nd->intent.open.create_mode;
56 +               attr.ia_mode = nd->intent.it_create_mode;
57                 attr.ia_valid = ATTR_MODE;
58                 if (!IS_POSIXACL(dir))
59                         attr.ia_mode &= ~current->fs->umask;
60         } else {
61                 attr.ia_valid = 0;
62 -               BUG_ON(nd->intent.open.flags & O_CREAT);
63 +               BUG_ON(nd->intent.it_flags & O_CREAT);
64         }
65  
66         cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
67 -       state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred);
68 +       state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred);
69         put_rpccred(cred);
70         if (IS_ERR(state))
71                 return (struct inode *)state;
72 .old..........pc/linux-2.6.3-nfs-intent-suse/fs/cifs/dir.c
73 .new.........fs/cifs/dir.c
74 Index: linux-2.6.3-20/fs/cifs/dir.c
75 ===================================================================
76 --- linux-2.6.3-20.orig/fs/cifs/dir.c   2004-03-05 02:07:03.000000000 -0800
77 +++ linux-2.6.3-20/fs/cifs/dir.c        2004-03-08 17:16:19.000000000 -0800
78 @@ -146,18 +146,18 @@
79         if(nd) { 
80                 cFYI(1,("In create for inode %p dentry->inode %p nd flags = 0x%x for %s",inode, direntry->d_inode, nd->flags,full_path));
81  
82 -               if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY)
83 +               if ((nd->intent.it_flags & O_ACCMODE) == O_RDONLY)
84                         desiredAccess = GENERIC_READ;
85 -               else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY)
86 +               else if ((nd->intent.it_flags & O_ACCMODE) == O_WRONLY)
87                         desiredAccess = GENERIC_WRITE;
88 -               else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR)
89 +               else if ((nd->intent.it_flags & O_ACCMODE) == O_RDWR)
90                         desiredAccess = GENERIC_ALL;
91  
92 -               if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
93 +               if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
94                         disposition = FILE_CREATE;
95 -               else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
96 +               else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
97                         disposition = FILE_OVERWRITE_IF;
98 -               else if((nd->intent.open.flags & O_CREAT) == O_CREAT)
99 +               else if((nd->intent.it_flags & O_CREAT) == O_CREAT)
100                         disposition = FILE_OPEN_IF;
101                 else {
102                         cFYI(1,("Create flag not set in create function"));
103 @@ -314,7 +314,7 @@
104               parent_dir_inode, direntry->d_name.name, direntry));
105  
106         if(nd) {  /* BB removeme */
107 -               cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.open.flags));
108 +               cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.it_flags));
109         } /* BB removeme BB */
110         /* BB Add check of incoming data - e.g. frame not longer than maximum SMB - let server check the namelen BB */
111