Whamcloud - gitweb
- put the exit(1)s back in after MPI_Abort() in the hopes that MPI
[fs/lustre-release.git] / lustre / kernel_patches / patches / fs-intent-2.6.3-mm4.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-mm4/fs/nfs/dir.c
6 ===================================================================
7 --- linux-2.6.3-mm4.orig/fs/nfs/dir.c   2004-03-08 17:05:35.000000000 +0800
8 +++ linux-2.6.3-mm4/fs/nfs/dir.c        2004-03-08 17:38:58.000000000 +0800
9 @@ -773,7 +773,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 @@ -794,7 +794,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 @@ -802,7 +802,7 @@
28         /* Revalidate parent directory attribute cache */
29         nfs_revalidate_inode(NFS_SERVER(dir), dir);
30  
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);
36 @@ -818,7 +818,7 @@
37                                 break;
38                         /* This turned out not to be a regular file */
39                         case -ELOOP:
40 -                               if (!(nd->intent.open.flags & O_NOFOLLOW))
41 +                               if (!(nd->intent.it_flags & O_NOFOLLOW))
42                                         goto no_open;
43                         /* case -EISDIR: */
44                         /* case -EINVAL: */
45 @@ -852,7 +852,7 @@
46         dir = parent->d_inode;
47         if (!is_atomic_open(dir, nd))
48                 goto no_open;
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 */
53                 if (!inode)
54 Index: linux-2.6.3-mm4/fs/nfs/nfs4proc.c
55 ===================================================================
56 --- linux-2.6.3-mm4.orig/fs/nfs/nfs4proc.c      2004-03-08 17:02:24.000000000 +0800
57 +++ linux-2.6.3-mm4/fs/nfs/nfs4proc.c   2004-03-08 17:37:59.000000000 +0800
58 @@ -778,17 +778,17 @@
59         struct nfs4_state *state;
60  
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;
67         } else {
68                 attr.ia_valid = 0;
69 -               BUG_ON(nd->intent.open.flags & O_CREAT);
70 +               BUG_ON(nd->intent.it_flags & O_CREAT);
71         }
72  
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);
76         put_rpccred(cred);
77         if (IS_ERR(state))
78                 return (struct inode *)state;
79 Index: linux-2.6.3-mm4/fs/cifs/dir.c
80 ===================================================================
81 --- linux-2.6.3-mm4.orig/fs/cifs/dir.c  2004-02-18 11:58:34.000000000 +0800
82 +++ linux-2.6.3-mm4/fs/cifs/dir.c       2004-03-08 17:37:59.000000000 +0800
83 @@ -146,18 +146,18 @@
84         if(nd) { 
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));
86  
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                         desiredAccess = GENERIC_ALL;
96  
97 -               if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
98 +               if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
99                         disposition = FILE_CREATE;
100 -               else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
101 +               else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
102                         disposition = FILE_OVERWRITE_IF;
103 -               else if((nd->intent.open.flags & O_CREAT) == O_CREAT)
104 +               else if((nd->intent.it_flags & O_CREAT) == O_CREAT)
105                         disposition = FILE_OPEN_IF;
106                 else {
107                         cFYI(1,("Create flag not set in create function"));
108 @@ -314,7 +314,7 @@
109               parent_dir_inode, direntry->d_name.name, direntry));
110  
111         if(nd) {  /* BB removeme */
112 -               cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.open.flags));
113 +               cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.it_flags));
114         } /* BB removeme BB */
115         /* BB Add check of incoming data - e.g. frame not longer than maximum SMB - let server check the namelen BB */
116