Commit 76998ebb authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: Observe the NFS_MOUNT_SOFTREVAL flag in _nfs4_proc_lookupp

We need to respect the NFS_MOUNT_SOFTREVAL flag in _nfs4_proc_lookupp,
by timing out if the server is unavailable.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 3c5e9a59
...@@ -4397,6 +4397,10 @@ static int _nfs4_proc_lookupp(struct inode *inode, ...@@ -4397,6 +4397,10 @@ static int _nfs4_proc_lookupp(struct inode *inode,
.rpc_argp = &args, .rpc_argp = &args,
.rpc_resp = &res, .rpc_resp = &res,
}; };
unsigned short task_flags = 0;
if (NFS_SERVER(inode)->flags & NFS_MOUNT_SOFTREVAL)
task_flags |= RPC_TASK_TIMEOUT;
args.bitmask = nfs4_bitmask(server, label); args.bitmask = nfs4_bitmask(server, label);
...@@ -4404,7 +4408,7 @@ static int _nfs4_proc_lookupp(struct inode *inode, ...@@ -4404,7 +4408,7 @@ static int _nfs4_proc_lookupp(struct inode *inode,
dprintk("NFS call lookupp ino=0x%lx\n", inode->i_ino); dprintk("NFS call lookupp ino=0x%lx\n", inode->i_ino);
status = nfs4_call_sync(clnt, server, &msg, &args.seq_args, status = nfs4_call_sync(clnt, server, &msg, &args.seq_args,
&res.seq_res, 0); &res.seq_res, task_flags);
dprintk("NFS reply lookupp: %d\n", status); dprintk("NFS reply lookupp: %d\n", status);
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment