]>
Commit | Line | Data |
---|---|---|
677c3905 GKH |
1 | From 304020fe48c6c7fff8b5a38f382b54404f0f79d3 Mon Sep 17 00:00:00 2001 |
2 | From: Trond Myklebust <trond.myklebust@primarydata.com> | |
3 | Date: Thu, 22 Sep 2016 13:39:18 -0400 | |
4 | Subject: NFSv4: Open state recovery must account for file permission changes | |
5 | ||
6 | From: Trond Myklebust <trond.myklebust@primarydata.com> | |
7 | ||
8 | commit 304020fe48c6c7fff8b5a38f382b54404f0f79d3 upstream. | |
9 | ||
10 | If the file permissions change on the server, then we may not be able to | |
11 | recover open state. If so, we need to ensure that we mark the file | |
12 | descriptor appropriately. | |
13 | ||
14 | Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> | |
15 | Tested-by: Oleg Drokin <green@linuxhacker.ru> | |
16 | Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> | |
17 | Signed-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); |