diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-11-14 11:19:56 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2016-11-18 14:18:02 -0500 |
commit | 5cc7861eb5b425c7a30ff7676a4b9d0ca62d5c76 (patch) | |
tree | 96ed40b36a68de96b846579f13c44293c7aef918 /fs | |
parent | 3e7dfb1659c2888fc0152ec2b02a5e932397bb0a (diff) | |
download | op-kernel-dev-5cc7861eb5b425c7a30ff7676a4b9d0ca62d5c76.zip op-kernel-dev-5cc7861eb5b425c7a30ff7676a4b9d0ca62d5c76.tar.gz |
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: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 0b3cdf8..2d1481e 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3122,7 +3122,8 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data) } else if (is_rdwr) 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; spin_unlock(&state->owner->so_lock); |