summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-11-14 11:19:56 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-11-18 14:18:02 -0500
commit5cc7861eb5b425c7a30ff7676a4b9d0ca62d5c76 (patch)
tree96ed40b36a68de96b846579f13c44293c7aef918 /fs
parent3e7dfb1659c2888fc0152ec2b02a5e932397bb0a (diff)
downloadlinux-rt-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 0b3cdf856333..2d1481eb1929 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);