Commit 1de3af9883fe2b689d1f61b205e9f5a0cedca8e7
1 parent
cbd7be43c4
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 <trond.myklebust@hammerspace.com>
Showing 1 changed file with 3 additions and 12 deletions Side-by-side Diff
fs/nfs/pagelist.c
... | ... | @@ -629,7 +629,6 @@ |
629 | 629 | .workqueue = nfsiod_workqueue, |
630 | 630 | .flags = RPC_TASK_ASYNC | RPC_TASK_CRED_NOREF | flags, |
631 | 631 | }; |
632 | - int ret = 0; | |
633 | 632 | |
634 | 633 | hdr->rw_ops->rw_initiate(hdr, &msg, rpc_ops, &task_setup_data, how); |
635 | 634 | |
636 | 635 | |
... | ... | @@ -641,18 +640,10 @@ |
641 | 640 | (unsigned long long)hdr->args.offset); |
642 | 641 | |
643 | 642 | 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); | |
653 | 645 | rpc_put_task(task); |
654 | -out: | |
655 | - return ret; | |
646 | + return 0; | |
656 | 647 | } |
657 | 648 | EXPORT_SYMBOL_GPL(nfs_initiate_pgio); |
658 | 649 |