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 | 535918f14176396646b5547b7d1353c932f24f5e (patch) | |
tree | 0736137c736ac8c35cfbdd99a1de68eb556e4b4a /fs/nfs/nfs4proc.c | |
parent | b8d4caddd871758ffa156be51b4c8be82fea470d (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.c | 28 |
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 | ||
2040 | int | ||
2041 | nfs4_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 | } | ||
2063 | out_drop: | ||
2064 | d_drop(ctx->path.dentry); | ||
2065 | return 0; | ||
2066 | } | ||
2067 | |||
2068 | static void nfs4_close_context(struct nfs_open_context *ctx, int is_sync) | 2040 | static void nfs4_close_context(struct nfs_open_context *ctx, int is_sync) |
2069 | { | 2041 | { |
2070 | if (ctx->state == NULL) | 2042 | if (ctx->state == NULL) |