summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-09-22 20:39:18 +0300
committerBen Hutchings <ben@decadent.org.uk>2017-02-23 06:50:51 +0300
commit281b1479835da523e4213079c3d94c3ff36e597c (patch)
treeda12dd3876ee7283af32f968d7c101aeffb78d1b
parent19f81b74d4e0f65286eb16787efa5fc6ea44b0d2 (diff)
downloadlinux-281b1479835da523e4213079c3d94c3ff36e597c.tar.xz
NFSv4: Open state recovery must account for file permission changes
commit 304020fe48c6c7fff8b5a38f382b54404f0f79d3 upstream. If the file permissions change on the server, then we may not be able to recover open state. If so, we need to ensure that we mark the file descriptor appropriately. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Tested-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--fs/nfs/nfs4state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index c4c82439d60e..c8b51f404eda 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1203,6 +1203,9 @@ restart:
__func__, status);
case -ENOENT:
case -ENOMEM:
+ case -EACCES:
+ case -EROFS:
+ case -EIO:
case -ESTALE:
/*
* Open state on this file cannot be recovered