|
@@ -2366,15 +2366,16 @@ int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * write_one_page - write out a single page and optionally wait on I/O
|
|
|
+ * write_one_page - write out a single page and wait on I/O
|
|
|
* @page: the page to write
|
|
|
- * @wait: if true, wait on writeout
|
|
|
*
|
|
|
* The page must be locked by the caller and will be unlocked upon return.
|
|
|
*
|
|
|
- * write_one_page() returns a negative error code if I/O failed.
|
|
|
+ * write_one_page() returns a negative error code if I/O failed. Note that
|
|
|
+ * the address_space is not marked for error. The caller must do this if
|
|
|
+ * needed.
|
|
|
*/
|
|
|
-int write_one_page(struct page *page, int wait)
|
|
|
+int write_one_page(struct page *page)
|
|
|
{
|
|
|
struct address_space *mapping = page->mapping;
|
|
|
int ret = 0;
|
|
@@ -2385,13 +2386,12 @@ int write_one_page(struct page *page, int wait)
|
|
|
|
|
|
BUG_ON(!PageLocked(page));
|
|
|
|
|
|
- if (wait)
|
|
|
- wait_on_page_writeback(page);
|
|
|
+ wait_on_page_writeback(page);
|
|
|
|
|
|
if (clear_page_dirty_for_io(page)) {
|
|
|
get_page(page);
|
|
|
ret = mapping->a_ops->writepage(page, &wbc);
|
|
|
- if (ret == 0 && wait) {
|
|
|
+ if (ret == 0) {
|
|
|
wait_on_page_writeback(page);
|
|
|
if (PageError(page))
|
|
|
ret = -EIO;
|