diff options
author | Trond Myklebust | 2015-09-20 20:58:42 +0200 |
---|---|---|
committer | Trond Myklebust | 2015-10-08 16:45:53 +0200 |
commit | 4816fdadab9ff874ec1a4138dad43b636c7d220b (patch) | |
tree | c00606037841cb80e621fa7c5072146952b754f5 /fs/nfs/nfs4proc.c | |
parent | NFSv4: nfs4_async_handle_error should take a non-const nfs_server (diff) | |
download | kernel-qcow2-linux-4816fdadab9ff874ec1a4138dad43b636c7d220b.tar.gz kernel-qcow2-linux-4816fdadab9ff874ec1a4138dad43b636c7d220b.tar.xz kernel-qcow2-linux-4816fdadab9ff874ec1a4138dad43b636c7d220b.zip |
NFSv4: Don't use synchronous delegation recall in exception handling
The code needs to be able to work from inside an asynchronous context.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index ae5cde621954..2a155ec05f6d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -362,11 +362,9 @@ static int nfs4_do_handle_exception(struct nfs_server *server, case -NFS4ERR_DELEG_REVOKED: case -NFS4ERR_ADMIN_REVOKED: case -NFS4ERR_BAD_STATEID: - if (inode && nfs4_have_delegation(inode, FMODE_READ)) { - nfs4_inode_return_delegation(inode); - exception->retry = 1; - return 0; - } + if (inode && nfs_async_inode_return_delegation(inode, + NULL) == 0) + goto wait_on_recovery; if (state == NULL) break; ret = nfs4_schedule_stateid_recovery(server, state); |