Commit b6354e60 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Anna Schumaker
Browse files

nfs: fold nfs_page_async_flush into nfs_do_writepage



Fold nfs_page_async_flush into its only caller to clean up the code a
bit.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAnna Schumaker <anna.schumaker@oracle.com>
parent 3a306535
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -632,13 +632,14 @@ static void nfs_write_error(struct nfs_page *req, int error)
 * Find an associated nfs write request, and prepare to flush it out
 * May return an error if the user signalled nfs_wait_on_request().
 */
static int nfs_page_async_flush(struct folio *folio,
				struct writeback_control *wbc,
static int nfs_do_writepage(struct folio *folio, struct writeback_control *wbc,
		struct nfs_pageio_descriptor *pgio)
{
	struct nfs_page *req;
	int ret = 0;

	nfs_pageio_cond_complete(pgio, folio->index);

	req = nfs_lock_and_join_requests(folio);
	if (!req)
		goto out;
@@ -677,13 +678,6 @@ static int nfs_page_async_flush(struct folio *folio,
	return 0;
}

static int nfs_do_writepage(struct folio *folio, struct writeback_control *wbc,
			    struct nfs_pageio_descriptor *pgio)
{
	nfs_pageio_cond_complete(pgio, folio->index);
	return nfs_page_async_flush(folio, wbc, pgio);
}

/*
 * Write an mmapped page to the server.
 */