diff options
| author | Christoph Hellwig <hch@lst.de> | 2025-05-07 06:48:51 +0200 |
|---|---|---|
| committer | Anna Schumaker <anna.schumaker@oracle.com> | 2025-05-28 17:17:13 -0400 |
| commit | b6354e60dd01d700a99d1f8c2f20d8ed530b0f45 (patch) | |
| tree | 9cf8fdeff46764df3b9f6cd9c5ddc1703de39040 | |
| parent | 3a3065352f73381d3a1aa0ccab44aec3a5a9b365 (diff) | |
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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
| -rw-r--r-- | fs/nfs/write.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 23df8b214474..148e773c3665 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -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, - struct nfs_pageio_descriptor *pgio) +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 @@ out_launder: 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. */ |
