aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 741a562177fc..c7b8d39a3ce1 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1488,7 +1488,7 @@ static int _nfs4_open_expired(struct nfs_open_context *ctx, struct nfs4_state *s
1488 return ret; 1488 return ret;
1489} 1489}
1490 1490
1491static inline int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state) 1491static int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state)
1492{ 1492{
1493 struct nfs_server *server = NFS_SERVER(state->inode); 1493 struct nfs_server *server = NFS_SERVER(state->inode);
1494 struct nfs4_exception exception = { }; 1494 struct nfs4_exception exception = { };
@@ -1496,10 +1496,16 @@ static inline int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4
1496 1496
1497 do { 1497 do {
1498 err = _nfs4_open_expired(ctx, state); 1498 err = _nfs4_open_expired(ctx, state);
1499 if (err != -NFS4ERR_DELAY) 1499 switch (err) {
1500 break; 1500 default:
1501 nfs4_handle_exception(server, err, &exception); 1501 goto out;
1502 case -NFS4ERR_GRACE:
1503 case -NFS4ERR_DELAY:
1504 nfs4_handle_exception(server, err, &exception);
1505 err = 0;
1506 }
1502 } while (exception.retry); 1507 } while (exception.retry);
1508out:
1503 return err; 1509 return err;
1504} 1510}
1505 1511
@@ -4049,10 +4055,16 @@ static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request
4049 if (test_bit(NFS_DELEGATED_STATE, &state->flags) != 0) 4055 if (test_bit(NFS_DELEGATED_STATE, &state->flags) != 0)
4050 return 0; 4056 return 0;
4051 err = _nfs4_do_setlk(state, F_SETLK, request, 0); 4057 err = _nfs4_do_setlk(state, F_SETLK, request, 0);
4052 if (err != -NFS4ERR_DELAY) 4058 switch (err) {
4053 break; 4059 default:
4054 nfs4_handle_exception(server, err, &exception); 4060 goto out;
4061 case -NFS4ERR_GRACE:
4062 case -NFS4ERR_DELAY:
4063 nfs4_handle_exception(server, err, &exception);
4064 err = 0;
4065 }
4055 } while (exception.retry); 4066 } while (exception.retry);
4067out:
4056 return err; 4068 return err;
4057} 4069}
4058 4070