NFSv4: Handle RPC level errors in LAYOUTRETURN
Handle RPC level errors by assuming that the RPC call was successful. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:

committed by
Anna Schumaker

parent
078a432d1c
commit
6109bcf713
@@ -9051,6 +9051,15 @@ static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata)
|
||||
if (!nfs41_sequence_process(task, &lrp->res.seq_res))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Was there an RPC level error? Assume the call succeeded,
|
||||
* and that we need to release the layout
|
||||
*/
|
||||
if (task->tk_rpc_status != 0 && RPC_WAS_SENT(task)) {
|
||||
lrp->res.lrs_present = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
server = NFS_SERVER(lrp->args.inode);
|
||||
switch (task->tk_status) {
|
||||
case -NFS4ERR_OLD_STATEID:
|
||||
|
Reference in New Issue
Block a user