diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index aee1bcc1fcc9..7f25246bf38c 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1118,6 +1118,7 @@ static int nfs4_open_recover(struct nfs4_opendata *opendata, struct nfs4_state * | |||
1118 | clear_bit(NFS_DELEGATED_STATE, &state->flags); | 1118 | clear_bit(NFS_DELEGATED_STATE, &state->flags); |
1119 | smp_rmb(); | 1119 | smp_rmb(); |
1120 | if (state->n_rdwr != 0) { | 1120 | if (state->n_rdwr != 0) { |
1121 | clear_bit(NFS_O_RDWR_STATE, &state->flags); | ||
1121 | ret = nfs4_open_recover_helper(opendata, FMODE_READ|FMODE_WRITE, &newstate); | 1122 | ret = nfs4_open_recover_helper(opendata, FMODE_READ|FMODE_WRITE, &newstate); |
1122 | if (ret != 0) | 1123 | if (ret != 0) |
1123 | return ret; | 1124 | return ret; |
@@ -1125,6 +1126,7 @@ static int nfs4_open_recover(struct nfs4_opendata *opendata, struct nfs4_state * | |||
1125 | return -ESTALE; | 1126 | return -ESTALE; |
1126 | } | 1127 | } |
1127 | if (state->n_wronly != 0) { | 1128 | if (state->n_wronly != 0) { |
1129 | clear_bit(NFS_O_WRONLY_STATE, &state->flags); | ||
1128 | ret = nfs4_open_recover_helper(opendata, FMODE_WRITE, &newstate); | 1130 | ret = nfs4_open_recover_helper(opendata, FMODE_WRITE, &newstate); |
1129 | if (ret != 0) | 1131 | if (ret != 0) |
1130 | return ret; | 1132 | return ret; |
@@ -1132,6 +1134,7 @@ static int nfs4_open_recover(struct nfs4_opendata *opendata, struct nfs4_state * | |||
1132 | return -ESTALE; | 1134 | return -ESTALE; |
1133 | } | 1135 | } |
1134 | if (state->n_rdonly != 0) { | 1136 | if (state->n_rdonly != 0) { |
1137 | clear_bit(NFS_O_RDONLY_STATE, &state->flags); | ||
1135 | ret = nfs4_open_recover_helper(opendata, FMODE_READ, &newstate); | 1138 | ret = nfs4_open_recover_helper(opendata, FMODE_READ, &newstate); |
1136 | if (ret != 0) | 1139 | if (ret != 0) |
1137 | return ret; | 1140 | return ret; |