diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-09-17 10:56:51 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-09-17 10:56:51 -0400 |
commit | 2b484297e48c3fbb1846fc6ea10036d9465273e7 (patch) | |
tree | bfd8f5cfba73b597d5277ba48e02fd2c13ece9b3 /fs/nfs/dir.c | |
parent | c0204fd2b8fe047b18b67e07e1bf2a03691240cd (diff) |
NFS: Add an 'open_context' element to struct nfs_rpc_ops
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index e37ffddd79c2..1e9e18813ad7 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/mount.h> | 34 | #include <linux/mount.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | 36 | ||
37 | #include "nfs4_fs.h" | ||
38 | #include "delegation.h" | 37 | #include "delegation.h" |
39 | #include "iostat.h" | 38 | #include "iostat.h" |
40 | #include "internal.h" | 39 | #include "internal.h" |
@@ -1127,7 +1126,7 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry | |||
1127 | 1126 | ||
1128 | /* Open the file on the server */ | 1127 | /* Open the file on the server */ |
1129 | nfs_block_sillyrename(dentry->d_parent); | 1128 | nfs_block_sillyrename(dentry->d_parent); |
1130 | inode = nfs4_atomic_open(dir, ctx, open_flags, &attr); | 1129 | inode = NFS_PROTO(dir)->open_context(dir, ctx, open_flags, &attr); |
1131 | if (IS_ERR(inode)) { | 1130 | if (IS_ERR(inode)) { |
1132 | nfs_unblock_sillyrename(dentry->d_parent); | 1131 | nfs_unblock_sillyrename(dentry->d_parent); |
1133 | put_nfs_open_context(ctx); | 1132 | put_nfs_open_context(ctx); |
@@ -1175,8 +1174,10 @@ static int nfs_open_revalidate(struct dentry *dentry, struct nameidata *nd) | |||
1175 | 1174 | ||
1176 | if (!is_atomic_open(nd) || d_mountpoint(dentry)) | 1175 | if (!is_atomic_open(nd) || d_mountpoint(dentry)) |
1177 | goto no_open; | 1176 | goto no_open; |
1177 | |||
1178 | parent = dget_parent(dentry); | 1178 | parent = dget_parent(dentry); |
1179 | dir = parent->d_inode; | 1179 | dir = parent->d_inode; |
1180 | |||
1180 | /* We can't create new files in nfs_open_revalidate(), so we | 1181 | /* We can't create new files in nfs_open_revalidate(), so we |
1181 | * optimize away revalidation of negative dentries. | 1182 | * optimize away revalidation of negative dentries. |
1182 | */ | 1183 | */ |
@@ -1205,7 +1206,7 @@ static int nfs_open_revalidate(struct dentry *dentry, struct nameidata *nd) | |||
1205 | * operations that change the directory. We therefore save the | 1206 | * operations that change the directory. We therefore save the |
1206 | * change attribute *before* we do the RPC call. | 1207 | * change attribute *before* we do the RPC call. |
1207 | */ | 1208 | */ |
1208 | inode = nfs4_atomic_open(dir, ctx, openflags, NULL); | 1209 | inode = NFS_PROTO(dir)->open_context(dir, ctx, openflags, NULL); |
1209 | if (IS_ERR(inode)) { | 1210 | if (IS_ERR(inode)) { |
1210 | ret = PTR_ERR(inode); | 1211 | ret = PTR_ERR(inode); |
1211 | switch (ret) { | 1212 | switch (ret) { |