Whamcloud - gitweb
- mds->lmv->mdc propagate lower timeout down to import
[fs/lustre-release.git] / lustre / kernel_patches / patches / linux-2.6.3-nfs-intent.patch
1 Index: linux-2.6.3/fs/nfs/dir.c
2 ===================================================================
3 --- linux-2.6.3.orig/fs/nfs/dir.c       2004-02-23 14:36:26.000000000 -0800
4 +++ linux-2.6.3/fs/nfs/dir.c    2004-02-23 14:46:49.000000000 -0800
5 @@ -782,7 +782,7 @@
6         if (nd->flags & LOOKUP_DIRECTORY)
7                 return 0;
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)))
11                 return 0;
12         return 1;
13  }
14 @@ -803,7 +803,7 @@
15         dentry->d_op = NFS_PROTO(dir)->dentry_ops;
16  
17         /* Let vfs_create() deal with O_EXCL */
18 -       if (nd->intent.open.flags & O_EXCL)
19 +       if (nd->intent.it_flags & O_EXCL)
20                 goto no_entry;
21  
22         /* Open the file on the server */
23 @@ -811,7 +811,7 @@
24         /* Revalidate parent directory attribute cache */
25         nfs_revalidate_inode(NFS_SERVER(dir), dir);
26  
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);
32 @@ -827,7 +827,7 @@
33                                 break;
34                         /* This turned out not to be a regular file */
35                         case -ELOOP:
36 -                               if (!(nd->intent.open.flags & O_NOFOLLOW))
37 +                               if (!(nd->intent.it_flags & O_NOFOLLOW))
38                                         goto no_open;
39                         /* case -EISDIR: */
40                         /* case -EINVAL: */
41 @@ -861,7 +861,7 @@
42         dir = parent->d_inode;
43         if (!is_atomic_open(dir, nd))
44                 goto no_open;
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 */
49                 if (!inode)
50 .old..........pc/linux-2.6.3-nfs-intent/fs/nfs/nfs4proc.c
51 .new.........fs/nfs/nfs4proc.c
52 Index: linux-2.6.3/fs/nfs/nfs4proc.c
53 ===================================================================
54 --- linux-2.6.3.orig/fs/nfs/nfs4proc.c  2004-02-23 14:36:26.000000000 -0800
55 +++ linux-2.6.3/fs/nfs/nfs4proc.c       2004-02-23 14:36:26.000000000 -0800
56 @@ -458,17 +458,17 @@
57         struct nfs4_state *state;
58  
59         if (nd->flags & LOOKUP_CREATE) {
60 -               attr.ia_mode = nd->intent.open.create_mode;
61 +               attr.ia_mode = nd->intent.it_create_mode;
62                 attr.ia_valid = ATTR_MODE;
63                 if (!IS_POSIXACL(dir))
64                         attr.ia_mode &= ~current->fs->umask;
65         } else {
66                 attr.ia_valid = 0;
67 -               BUG_ON(nd->intent.open.flags & O_CREAT);
68 +               BUG_ON(nd->intent.it_flags & O_CREAT);
69         }
70  
71         cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
72 -       state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred);
73 +       state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred);
74         put_rpccred(cred);
75         if (IS_ERR(state))
76                 return (struct inode *)state;