aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4_fs.h1
-rw-r--r--fs/nfs/nfs4proc.c2
-rw-r--r--fs/nfs/nfs4state.c22
-rw-r--r--fs/nfs/nfs4xdr.c4
4 files changed, 27 insertions, 2 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 0d25a82451d9..9a866368896a 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -270,6 +270,7 @@ extern void nfs4_state_set_mode_locked(struct nfs4_state *, fmode_t);
270extern void nfs4_schedule_state_recovery(struct nfs_client *); 270extern void nfs4_schedule_state_recovery(struct nfs_client *);
271extern void nfs4_schedule_state_manager(struct nfs_client *); 271extern void nfs4_schedule_state_manager(struct nfs_client *);
272extern int nfs4_state_mark_reclaim_nograce(struct nfs_client *clp, struct nfs4_state *state); 272extern int nfs4_state_mark_reclaim_nograce(struct nfs_client *clp, struct nfs4_state *state);
273extern void nfs41_handle_sequence_flag_errors(struct nfs_client *clp, u32 flags);
273extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); 274extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp);
274extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl); 275extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl);
275extern void nfs4_copy_stateid(nfs4_stateid *, struct nfs4_state *, fl_owner_t); 276extern void nfs4_copy_stateid(nfs4_stateid *, struct nfs4_state *, fl_owner_t);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index d897b9e34f12..71993f122214 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -405,6 +405,8 @@ static void nfs41_sequence_done(struct nfs_client *clp,
405 if (time_before(clp->cl_last_renewal, timestamp)) 405 if (time_before(clp->cl_last_renewal, timestamp))
406 clp->cl_last_renewal = timestamp; 406 clp->cl_last_renewal = timestamp;
407 spin_unlock(&clp->cl_lock); 407 spin_unlock(&clp->cl_lock);
408 /* Check sequence flags */
409 nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags);
408 return; 410 return;
409 } 411 }
410out: 412out:
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 46c69e2248e3..a86f3acf3212 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1173,6 +1173,28 @@ static int nfs4_reclaim_lease(struct nfs_client *clp)
1173} 1173}
1174 1174
1175#ifdef CONFIG_NFS_V4_1 1175#ifdef CONFIG_NFS_V4_1
1176void nfs41_handle_sequence_flag_errors(struct nfs_client *clp, u32 flags)
1177{
1178 if (!flags)
1179 return;
1180 else if (flags & SEQ4_STATUS_RESTART_RECLAIM_NEEDED) {
1181 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
1182 nfs4_state_start_reclaim_reboot(clp);
1183 nfs4_schedule_state_recovery(clp);
1184 } else if (flags & (SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED |
1185 SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED |
1186 SEQ4_STATUS_ADMIN_STATE_REVOKED |
1187 SEQ4_STATUS_RECALLABLE_STATE_REVOKED |
1188 SEQ4_STATUS_LEASE_MOVED)) {
1189 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
1190 nfs4_state_start_reclaim_nograce(clp);
1191 nfs4_schedule_state_recovery(clp);
1192 } else if (flags & (SEQ4_STATUS_CB_PATH_DOWN |
1193 SEQ4_STATUS_BACKCHANNEL_FAULT |
1194 SEQ4_STATUS_CB_PATH_DOWN_SESSION))
1195 nfs_expire_all_delegations(clp);
1196}
1197
1176static void nfs4_session_recovery_handle_error(struct nfs_client *clp, int err) 1198static void nfs4_session_recovery_handle_error(struct nfs_client *clp, int err)
1177{ 1199{
1178 switch (err) { 1200 switch (err) {
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 4ddd04a1113e..f740472370aa 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -4614,8 +4614,8 @@ static int decode_sequence(struct xdr_stream *xdr,
4614 dummy = be32_to_cpup(p++); 4614 dummy = be32_to_cpup(p++);
4615 /* target highest slot id - currently not processed */ 4615 /* target highest slot id - currently not processed */
4616 dummy = be32_to_cpup(p++); 4616 dummy = be32_to_cpup(p++);
4617 /* result flags - currently not processed */ 4617 /* result flags */
4618 dummy = be32_to_cpup(p); 4618 res->sr_status_flags = be32_to_cpup(p);
4619 status = 0; 4619 status = 0;
4620out_err: 4620out_err:
4621 res->sr_status = status; 4621 res->sr_status = status;