Commit 5cc7861e authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

NFSv4: Don't call close if the open stateid has already been cleared

Ensure we test to see if the open stateid is actually set, before we
send a CLOSE.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 3e7dfb16
...@@ -3122,7 +3122,8 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data) ...@@ -3122,7 +3122,8 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
} else if (is_rdwr) } else if (is_rdwr)
calldata->arg.fmode |= FMODE_READ|FMODE_WRITE; calldata->arg.fmode |= FMODE_READ|FMODE_WRITE;
if (!nfs4_valid_open_stateid(state)) if (!nfs4_valid_open_stateid(state) ||
test_bit(NFS_OPEN_STATE, &state->flags) == 0)
call_close = 0; call_close = 0;
spin_unlock(&state->owner->so_lock); spin_unlock(&state->owner->so_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment