diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-09 16:00:56 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-11 15:18:36 -0500 |
commit | ecac799a5ecc364006f0db6f2db15e77ed4d63e2 (patch) | |
tree | 200a71e8c3d564bb26e31cda2c4283142c380ee7 /fs | |
parent | b4410c2f7f775b03da31566c05bb8d2383c7dc27 (diff) |
NFSv4: Fix the setlk error handler
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index b0b1a5568529..bf4e6d4b5bf5 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -4173,23 +4173,18 @@ static const struct rpc_call_ops nfs4_recover_lock_ops = { | |||
4173 | 4173 | ||
4174 | static void nfs4_handle_setlk_error(struct nfs_server *server, struct nfs4_lock_state *lsp, int new_lock_owner, int error) | 4174 | static void nfs4_handle_setlk_error(struct nfs_server *server, struct nfs4_lock_state *lsp, int new_lock_owner, int error) |
4175 | { | 4175 | { |
4176 | struct nfs_client *clp = server->nfs_client; | ||
4177 | struct nfs4_state *state = lsp->ls_state; | ||
4178 | |||
4179 | switch (error) { | 4176 | switch (error) { |
4180 | case -NFS4ERR_ADMIN_REVOKED: | 4177 | case -NFS4ERR_ADMIN_REVOKED: |
4181 | case -NFS4ERR_BAD_STATEID: | 4178 | case -NFS4ERR_BAD_STATEID: |
4182 | case -NFS4ERR_EXPIRED: | 4179 | lsp->ls_seqid.flags &= ~NFS_SEQID_CONFIRMED; |
4183 | if (new_lock_owner != 0 || | 4180 | if (new_lock_owner != 0 || |
4184 | (lsp->ls_flags & NFS_LOCK_INITIALIZED) != 0) | 4181 | (lsp->ls_flags & NFS_LOCK_INITIALIZED) != 0) |
4185 | nfs4_state_mark_reclaim_nograce(clp, state); | 4182 | nfs4_schedule_stateid_recovery(server, lsp->ls_state); |
4186 | lsp->ls_seqid.flags &= ~NFS_SEQID_CONFIRMED; | ||
4187 | break; | 4183 | break; |
4188 | case -NFS4ERR_STALE_STATEID: | 4184 | case -NFS4ERR_STALE_STATEID: |
4189 | if (new_lock_owner != 0 || | ||
4190 | (lsp->ls_flags & NFS_LOCK_INITIALIZED) != 0) | ||
4191 | nfs4_state_mark_reclaim_reboot(clp, state); | ||
4192 | lsp->ls_seqid.flags &= ~NFS_SEQID_CONFIRMED; | 4185 | lsp->ls_seqid.flags &= ~NFS_SEQID_CONFIRMED; |
4186 | case -NFS4ERR_EXPIRED: | ||
4187 | nfs4_schedule_lease_recovery(server->nfs_client); | ||
4193 | }; | 4188 | }; |
4194 | } | 4189 | } |
4195 | 4190 | ||