diff options
-rw-r--r-- | fs/nfs/nfs4proc.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 006e98da730a..af3abf957f2c 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -6578,10 +6578,9 @@ static int _nfs41_test_stateid(struct nfs_server *server, nfs4_stateid *stateid) | |||
6578 | 6578 | ||
6579 | nfs41_init_sequence(&args.seq_args, &res.seq_res, 0); | 6579 | nfs41_init_sequence(&args.seq_args, &res.seq_res, 0); |
6580 | status = nfs4_call_sync_sequence(server->client, server, &msg, &args.seq_args, &res.seq_res, 1); | 6580 | status = nfs4_call_sync_sequence(server->client, server, &msg, &args.seq_args, &res.seq_res, 1); |
6581 | 6581 | if (status != NFS_OK) | |
6582 | if (status == NFS_OK) | 6582 | return status; |
6583 | return res.status; | 6583 | return -res.status; |
6584 | return status; | ||
6585 | } | 6584 | } |
6586 | 6585 | ||
6587 | static int nfs41_test_stateid(struct nfs_server *server, nfs4_stateid *stateid) | 6586 | static int nfs41_test_stateid(struct nfs_server *server, nfs4_stateid *stateid) |
@@ -6589,9 +6588,10 @@ static int nfs41_test_stateid(struct nfs_server *server, nfs4_stateid *stateid) | |||
6589 | struct nfs4_exception exception = { }; | 6588 | struct nfs4_exception exception = { }; |
6590 | int err; | 6589 | int err; |
6591 | do { | 6590 | do { |
6592 | err = nfs4_handle_exception(server, | 6591 | err = _nfs41_test_stateid(server, stateid); |
6593 | _nfs41_test_stateid(server, stateid), | 6592 | if (err != -NFS4ERR_DELAY) |
6594 | &exception); | 6593 | break; |
6594 | nfs4_handle_exception(server, err, &exception); | ||
6595 | } while (exception.retry); | 6595 | } while (exception.retry); |
6596 | return err; | 6596 | return err; |
6597 | } | 6597 | } |
@@ -6609,7 +6609,8 @@ static int _nfs4_free_stateid(struct nfs_server *server, nfs4_stateid *stateid) | |||
6609 | }; | 6609 | }; |
6610 | 6610 | ||
6611 | nfs41_init_sequence(&args.seq_args, &res.seq_res, 0); | 6611 | nfs41_init_sequence(&args.seq_args, &res.seq_res, 0); |
6612 | return nfs4_call_sync_sequence(server->client, server, &msg, &args.seq_args, &res.seq_res, 1); | 6612 | return nfs4_call_sync_sequence(server->client, server, &msg, |
6613 | &args.seq_args, &res.seq_res, 1); | ||
6613 | } | 6614 | } |
6614 | 6615 | ||
6615 | static int nfs41_free_stateid(struct nfs_server *server, nfs4_stateid *stateid) | 6616 | static int nfs41_free_stateid(struct nfs_server *server, nfs4_stateid *stateid) |
@@ -6617,9 +6618,10 @@ static int nfs41_free_stateid(struct nfs_server *server, nfs4_stateid *stateid) | |||
6617 | struct nfs4_exception exception = { }; | 6618 | struct nfs4_exception exception = { }; |
6618 | int err; | 6619 | int err; |
6619 | do { | 6620 | do { |
6620 | err = nfs4_handle_exception(server, | 6621 | err = _nfs4_free_stateid(server, stateid); |
6621 | _nfs4_free_stateid(server, stateid), | 6622 | if (err != -NFS4ERR_DELAY) |
6622 | &exception); | 6623 | break; |
6624 | nfs4_handle_exception(server, err, &exception); | ||
6623 | } while (exception.retry); | 6625 | } while (exception.retry); |
6624 | return err; | 6626 | return err; |
6625 | } | 6627 | } |