[PATCH v1 4/4] Use write_kdump_page instead of write_cache in write_kdump_pages_cyclic

Zhou Wenjian zhouwj-fnst at cn.fujitsu.com
Thu Jul 9 19:28:53 PDT 2015


Signed-off-by: Zhou Wenjian <zhouwj-fnst at cn.fujitsu.com>
---
 makedumpfile.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 74bf83e..0f1aa94 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -6515,17 +6515,11 @@ write_kdump_pages_cyclic(struct cache_data *cd_header, struct cache_data *cd_pag
 		pd.offset     = *offset_data;
 		*offset_data  += pd.size;
 
-                /*
-                 * Write the page header.
-                 */
-                if (!write_cache(cd_header, &pd, sizeof(page_desc_t)))
-                        goto out;
-
-                /*
-                 * Write the page data.
-                 */
-		if (!write_cache(cd_page, pd.flags ? buf_out : buf, pd.size))
-                        goto out;
+               /*
+                * Write the page header and the page data
+                */
+               if (!write_kdump_page(cd_header, cd_page, &pd, pd.flags ? buf_out : buf))
+                       goto out;
         }
 
 	ret = TRUE;
-- 
1.8.3.1




More information about the kexec mailing list