Skip to content

Commit b6354e6

Browse files
Christoph HellwigAnna Schumaker
authored andcommitted
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 <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 3a30653 commit b6354e6

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

fs/nfs/write.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -632,13 +632,14 @@ static void nfs_write_error(struct nfs_page *req, int error)
632632
* Find an associated nfs write request, and prepare to flush it out
633633
* May return an error if the user signalled nfs_wait_on_request().
634634
*/
635-
static int nfs_page_async_flush(struct folio *folio,
636-
struct writeback_control *wbc,
637-
struct nfs_pageio_descriptor *pgio)
635+
static int nfs_do_writepage(struct folio *folio, struct writeback_control *wbc,
636+
struct nfs_pageio_descriptor *pgio)
638637
{
639638
struct nfs_page *req;
640639
int ret = 0;
641640

641+
nfs_pageio_cond_complete(pgio, folio->index);
642+
642643
req = nfs_lock_and_join_requests(folio);
643644
if (!req)
644645
goto out;
@@ -677,13 +678,6 @@ static int nfs_page_async_flush(struct folio *folio,
677678
return 0;
678679
}
679680

680-
static int nfs_do_writepage(struct folio *folio, struct writeback_control *wbc,
681-
struct nfs_pageio_descriptor *pgio)
682-
{
683-
nfs_pageio_cond_complete(pgio, folio->index);
684-
return nfs_page_async_flush(folio, wbc, pgio);
685-
}
686-
687681
/*
688682
* Write an mmapped page to the server.
689683
*/

0 commit comments

Comments
 (0)