From 654586b8f498550056d4a5949768a70736f07677 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Sun, 7 Aug 2016 21:35:13 -0400 Subject: [PATCH] LU-8056 mem: handle GFP_IOFS removal in newer kernels Starting with linux kernel 4.5 GFP_IOFS has been removed. GFP_IOFS was meant to be a short hande to clear two GFP flags but it was never used properly. Replace it with GFP_NOFS instead. Change-Id: I97e045b1363ce216426ae709145b839a838e5762 Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/21781 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/mdt/mdt_handler.c | 2 +- lustre/obdclass/lu_ref.c | 2 +- lustre/osp/osp_object.c | 2 +- lustre/ptlrpc/nodemap_storage.c | 2 +- lustre/quota/qsd_reint.c | 2 +- lustre/target/tgt_handler.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 0b31287..437b7da 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -1792,7 +1792,7 @@ static int mdt_readpage(struct tgt_session_info *tsi) RETURN(-ENOMEM); for (i = 0; i < rdpg->rp_npages; ++i) { - rdpg->rp_pages[i] = alloc_page(GFP_IOFS); + rdpg->rp_pages[i] = alloc_page(GFP_NOFS); if (rdpg->rp_pages[i] == NULL) GOTO(free_rdpg, rc = -ENOMEM); } diff --git a/lustre/obdclass/lu_ref.c b/lustre/obdclass/lu_ref.c index aee9cf8..4cd6bf2 100644 --- a/lustre/obdclass/lu_ref.c +++ b/lustre/obdclass/lu_ref.c @@ -183,7 +183,7 @@ static struct lu_ref_link *lu_ref_add_context(struct lu_ref *ref, void lu_ref_add(struct lu_ref *ref, const char *scope, const void *source) { might_sleep(); - lu_ref_add_context(ref, GFP_IOFS, scope, source); + lu_ref_add_context(ref, GFP_NOFS, scope, source); } EXPORT_SYMBOL(lu_ref_add); diff --git a/lustre/osp/osp_object.c b/lustre/osp/osp_object.c index 268b82a..c0096c9 100644 --- a/lustre/osp/osp_object.c +++ b/lustre/osp/osp_object.c @@ -1678,7 +1678,7 @@ static int osp_it_fetch(const struct lu_env *env, struct osp_it *it) it->ooi_pages = pages; it->ooi_total_npages = npages; for (i = 0; i < npages; i++) { - pages[i] = alloc_page(GFP_IOFS); + pages[i] = alloc_page(GFP_NOFS); if (pages[i] == NULL) RETURN(-ENOMEM); } diff --git a/lustre/ptlrpc/nodemap_storage.c b/lustre/ptlrpc/nodemap_storage.c index f53a841..c94d4ec 100644 --- a/lustre/ptlrpc/nodemap_storage.c +++ b/lustre/ptlrpc/nodemap_storage.c @@ -1234,7 +1234,7 @@ int nodemap_get_config_req(struct obd_device *mgs_obd, if (rdpg.rp_pages == NULL) RETURN(-ENOMEM); for (i = 0; i < rdpg.rp_npages; i++) { - rdpg.rp_pages[i] = alloc_page(GFP_IOFS); + rdpg.rp_pages[i] = alloc_page(GFP_NOFS); if (rdpg.rp_pages[i] == NULL) GOTO(out, rc = -ENOMEM); } diff --git a/lustre/quota/qsd_reint.c b/lustre/quota/qsd_reint.c index 70d9b8b..c516d0f 100644 --- a/lustre/quota/qsd_reint.c +++ b/lustre/quota/qsd_reint.c @@ -203,7 +203,7 @@ static int qsd_reint_index(const struct lu_env *env, struct qsd_qtype_info *qqi, if (pages == NULL) GOTO(out, rc = -ENOMEM); for (i = 0; i < npages; i++) { - pages[i] = alloc_page(GFP_IOFS); + pages[i] = alloc_page(GFP_NOFS); if (pages[i] == NULL) GOTO(out, rc = -ENOMEM); } diff --git a/lustre/target/tgt_handler.c b/lustre/target/tgt_handler.c index 00f6bf8..a76c023 100644 --- a/lustre/target/tgt_handler.c +++ b/lustre/target/tgt_handler.c @@ -1117,7 +1117,7 @@ static int tgt_obd_idx_read(struct tgt_session_info *tsi) if (rdpg->rp_pages == NULL) GOTO(out, rc = -ENOMEM); for (i = 0; i < rdpg->rp_npages; i++) { - rdpg->rp_pages[i] = alloc_page(GFP_IOFS); + rdpg->rp_pages[i] = alloc_page(GFP_NOFS); if (rdpg->rp_pages[i] == NULL) GOTO(out, rc = -ENOMEM); } -- 1.8.3.1