aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-09-17 10:56:51 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-09-17 10:56:51 -0400
commit535918f14176396646b5547b7d1353c932f24f5e (patch)
tree0736137c736ac8c35cfbdd99a1de68eb556e4b4a /fs/nfs/nfs4proc.c
parentb8d4caddd871758ffa156be51b4c8be82fea470d (diff)
NFSv4: Further cleanups for nfs4_open_revalidate()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index b4762463b19f..83c5ef6e7cef 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2037,34 +2037,6 @@ nfs4_atomic_open(struct inode *dir, struct nfs_open_context *ctx, int open_flags
2037 return igrab(state->inode); 2037 return igrab(state->inode);
2038} 2038}
2039 2039
2040int
2041nfs4_open_revalidate(struct inode *dir, struct nfs_open_context *ctx, int openflags)
2042{
2043 struct nfs4_state *state;
2044
2045 state = nfs4_do_open(dir, &ctx->path, ctx->mode, openflags, NULL, ctx->cred);
2046 if (IS_ERR(state)) {
2047 switch (PTR_ERR(state)) {
2048 case -EPERM:
2049 case -EACCES:
2050 case -EDQUOT:
2051 case -ENOSPC:
2052 case -EROFS:
2053 return PTR_ERR(state);
2054 default:
2055 goto out_drop;
2056 }
2057 }
2058 ctx->state = state;
2059 if (state->inode == ctx->path.dentry->d_inode) {
2060 nfs_set_verifier(ctx->path.dentry, nfs_save_change_attribute(dir));
2061 return 1;
2062 }
2063out_drop:
2064 d_drop(ctx->path.dentry);
2065 return 0;
2066}
2067
2068static void nfs4_close_context(struct nfs_open_context *ctx, int is_sync) 2040static void nfs4_close_context(struct nfs_open_context *ctx, int is_sync)
2069{ 2041{
2070 if (ctx->state == NULL) 2042 if (ctx->state == NULL)