diff options
author | Trond Myklebust | 2013-04-01 14:34:05 -0500 |
---|---|---|
committer | Greg Kroah-Hartman | 2013-05-07 22:08:23 -0500 |
commit | 082265bbb37927de80da50c22bf24993c0b9ca75 (patch) | |
tree | 6097ddf3a8a5a682cd6e984ebe532a14b40d9108 /fs | |
parent | 70167a15d829277ed1373973b9535c20025c772a (diff) | |
download | kernel-omap-082265bbb37927de80da50c22bf24993c0b9ca75.tar.gz kernel-omap-082265bbb37927de80da50c22bf24993c0b9ca75.tar.xz kernel-omap-082265bbb37927de80da50c22bf24993c0b9ca75.zip |
NFSv4: Handle NFS4ERR_DELAY and NFS4ERR_GRACE in nfs4_open_delegation_recall
commit 8b6cc4d6f841d31f72fe7478453759166d366274 upstream.
A server shouldn't normally return NFS4ERR_GRACE if the client holds a
delegation, since no conflicting lock reclaims can be granted, however
the spec does not require the server to grant the open in this
instance
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 3d905e3ca491..51d53a47a456 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1374,6 +1374,12 @@ int nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_state | |||
1374 | case -ENOMEM: | 1374 | case -ENOMEM: |
1375 | err = 0; | 1375 | err = 0; |
1376 | goto out; | 1376 | goto out; |
1377 | case -NFS4ERR_DELAY: | ||
1378 | case -NFS4ERR_GRACE: | ||
1379 | set_bit(NFS_DELEGATED_STATE, &state->flags); | ||
1380 | ssleep(1); | ||
1381 | err = -EAGAIN; | ||
1382 | goto out; | ||
1377 | } | 1383 | } |
1378 | err = nfs4_handle_exception(server, err, &exception); | 1384 | err = nfs4_handle_exception(server, err, &exception); |
1379 | } while (exception.retry); | 1385 | } while (exception.retry); |