Skip to content

Commit 1de3af9

Browse files
author
Trond Myklebust
committed
NFS: Remove unused FLUSH_SYNC support in nfs_initiate_pgio()
If the FLUSH_SYNC flag is set, nfs_initiate_pgio() will currently wait for completion, and then return the status of the I/O operation. What we actually want to report in nfs_pageio_doio() is whether or not the RPC call was launched successfully, whereas actual I/O status is intended handled in the reply callbacks. Since FLUSH_SYNC is never set by any of the callers anyway, let's just remove that code altogether. Signed-off-by: Trond Myklebust <[email protected]>
1 parent cbd7be4 commit 1de3af9

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

fs/nfs/pagelist.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,6 @@ int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr,
629629
.workqueue = nfsiod_workqueue,
630630
.flags = RPC_TASK_ASYNC | RPC_TASK_CRED_NOREF | flags,
631631
};
632-
int ret = 0;
633632

634633
hdr->rw_ops->rw_initiate(hdr, &msg, rpc_ops, &task_setup_data, how);
635634

@@ -641,18 +640,10 @@ int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr,
641640
(unsigned long long)hdr->args.offset);
642641

643642
task = rpc_run_task(&task_setup_data);
644-
if (IS_ERR(task)) {
645-
ret = PTR_ERR(task);
646-
goto out;
647-
}
648-
if (how & FLUSH_SYNC) {
649-
ret = rpc_wait_for_completion_task(task);
650-
if (ret == 0)
651-
ret = task->tk_status;
652-
}
643+
if (IS_ERR(task))
644+
return PTR_ERR(task);
653645
rpc_put_task(task);
654-
out:
655-
return ret;
646+
return 0;
656647
}
657648
EXPORT_SYMBOL_GPL(nfs_initiate_pgio);
658649

0 commit comments

Comments
 (0)