]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.8.5/nfsv4-open-state-recovery-must-account-for-file-permission-changes.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.8.5 / nfsv4-open-state-recovery-must-account-for-file-permission-changes.patch
CommitLineData
677c3905
GKH
1From 304020fe48c6c7fff8b5a38f382b54404f0f79d3 Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <trond.myklebust@primarydata.com>
3Date: Thu, 22 Sep 2016 13:39:18 -0400
4Subject: NFSv4: Open state recovery must account for file permission changes
5
6From: Trond Myklebust <trond.myklebust@primarydata.com>
7
8commit 304020fe48c6c7fff8b5a38f382b54404f0f79d3 upstream.
9
10If the file permissions change on the server, then we may not be able to
11recover open state. If so, we need to ensure that we mark the file
12descriptor appropriately.
13
14Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
15Tested-by: Oleg Drokin <green@linuxhacker.ru>
16Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19---
20 fs/nfs/nfs4state.c | 3 +++
21 1 file changed, 3 insertions(+)
22
23--- a/fs/nfs/nfs4state.c
24+++ b/fs/nfs/nfs4state.c
25@@ -1498,6 +1498,9 @@ restart:
26 __func__, status);
27 case -ENOENT:
28 case -ENOMEM:
29+ case -EACCES:
30+ case -EROFS:
31+ case -EIO:
32 case -ESTALE:
33 /* Open state on this file cannot be recovered */
34 nfs4_state_mark_recovery_failed(state, status);