]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
mm: page_alloc: remove GFP_IOFS
authorMel Gorman <mgorman@techsingularity.net>
Sat, 7 Nov 2015 00:28:25 +0000 (16:28 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 7 Nov 2015 01:50:42 +0000 (17:50 -0800)
GFP_IOFS was intended to be shorthand for clearing two flags, not a set of
allocation flags.  There is only one user of this flag combination now and
there appears to be no reason why Lustre had to be protected from reclaim
stalls.  As none of the sites appear to be atomic, this patch simply
deletes GFP_IOFS and converts Lustre to using GFP_KERNEL, GFP_NOFS or
GFP_NOIO as appropriate.

Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/staging/lustre/lnet/lnet/router.c
drivers/staging/lustre/lnet/selftest/conrpc.c
drivers/staging/lustre/lnet/selftest/rpc.c
drivers/staging/lustre/lustre/libcfs/module.c
drivers/staging/lustre/lustre/libcfs/tracefile.c
drivers/staging/lustre/lustre/llite/remote_perm.c
drivers/staging/lustre/lustre/mgc/mgc_request.c
drivers/staging/lustre/lustre/obdecho/echo_client.c
drivers/staging/lustre/lustre/osc/osc_cache.c
include/linux/gfp.h

index fe49f1b8765260c8d5cc22d4f0e976993036dd22..4ea651c6db3a4492f14ae49d5e27c1b784c96a5e 100644 (file)
@@ -1245,7 +1245,7 @@ lnet_new_rtrbuf(lnet_rtrbufpool_t *rbp, int cpt)
        for (i = 0; i < npages; i++) {
                page = alloc_pages_node(
                                cfs_cpt_spread_node(lnet_cpt_table(), cpt),
-                               __GFP_ZERO | GFP_IOFS, 0);
+                               GFP_KERNEL | __GFP_ZERO, 0);
                if (page == NULL) {
                        while (--i >= 0)
                                __free_page(rb->rb_kiov[i].kiov_page);
index 0060ff64f88e65f4e1a94ddba56c84bd3ea6a5f3..64a0335934f3d25cf38313a83468a2f1b1fb618f 100644 (file)
@@ -860,7 +860,7 @@ lstcon_testrpc_prep(lstcon_node_t *nd, int transop, unsigned feats,
                        bulk->bk_iovs[i].kiov_offset = 0;
                        bulk->bk_iovs[i].kiov_len    = len;
                        bulk->bk_iovs[i].kiov_page   =
-                               alloc_page(GFP_IOFS);
+                               alloc_page(GFP_KERNEL);
 
                        if (bulk->bk_iovs[i].kiov_page == NULL) {
                                lstcon_rpc_put(*crpc);
index 162f9d330496bf40026dba82a6822f5d828731cf..7005002c15dab2a91407d2f5d5277e4a096287bf 100644 (file)
@@ -146,7 +146,7 @@ srpc_alloc_bulk(int cpt, unsigned bulk_npg, unsigned bulk_len, int sink)
                int nob;
 
                pg = alloc_pages_node(cfs_cpt_spread_node(lnet_cpt_table(), cpt),
-                                     GFP_IOFS, 0);
+                                     GFP_KERNEL, 0);
                if (pg == NULL) {
                        CERROR("Can't allocate page %d of %d\n", i, bulk_npg);
                        srpc_free_bulk(bk);
index 50e8fd23fa17fdf70307b4201fa4018d37ccfac8..07a68594c2791df5c75cbe138564b78008e8aefb 100644 (file)
@@ -319,7 +319,7 @@ static int libcfs_ioctl(struct cfs_psdev_file *pfile, unsigned long cmd, void *a
        struct libcfs_ioctl_data *data;
        int err = 0;
 
-       LIBCFS_ALLOC_GFP(buf, 1024, GFP_IOFS);
+       LIBCFS_ALLOC_GFP(buf, 1024, GFP_KERNEL);
        if (buf == NULL)
                return -ENOMEM;
 
index 973c7c209dfcaab4d4a1a56cb6c87c62407d83b2..f2d018d7823cdeb3f29b48cf970ed5f98b9c49da 100644 (file)
@@ -810,7 +810,7 @@ int cfs_trace_allocate_string_buffer(char **str, int nob)
        if (nob > 2 * PAGE_CACHE_SIZE)      /* string must be "sensible" */
                return -EINVAL;
 
-       *str = kmalloc(nob, GFP_IOFS | __GFP_ZERO);
+       *str = kmalloc(nob, GFP_KERNEL | __GFP_ZERO);
        if (*str == NULL)
                return -ENOMEM;
 
index c902133dfc97256f1444c6ba69f540f66d988324..fe4a72268e3aadf1b695cb1621641c5f6da4838e 100644 (file)
@@ -82,7 +82,7 @@ static struct hlist_head *alloc_rmtperm_hash(void)
        struct hlist_head *hash;
        int i;
 
-       hash = kmem_cache_alloc(ll_rmtperm_hash_cachep, GFP_IOFS | __GFP_ZERO);
+       hash = kmem_cache_alloc(ll_rmtperm_hash_cachep, GFP_NOFS | __GFP_ZERO);
        if (!hash)
                return NULL;
 
index b81efcd997aee821093e4b907e5c5ecacc7496cd..5f53f3b7cefff97599aae54f85ba2111cba24017 100644 (file)
@@ -1112,7 +1112,7 @@ static int mgc_apply_recover_logs(struct obd_device *mgc,
        LASSERT(cfg->cfg_instance != NULL);
        LASSERT(cfg->cfg_sb == cfg->cfg_instance);
 
-       inst = kzalloc(PAGE_CACHE_SIZE, GFP_NOFS);
+       inst = kzalloc(PAGE_CACHE_SIZE, GFP_KERNEL);
        if (!inst)
                return -ENOMEM;
 
@@ -1308,14 +1308,14 @@ static int mgc_process_recover_log(struct obd_device *obd,
        if (cfg->cfg_last_idx == 0) /* the first time */
                nrpages = CONFIG_READ_NRPAGES_INIT;
 
-       pages = kcalloc(nrpages, sizeof(*pages), GFP_NOFS);
+       pages = kcalloc(nrpages, sizeof(*pages), GFP_KERNEL);
        if (pages == NULL) {
                rc = -ENOMEM;
                goto out;
        }
 
        for (i = 0; i < nrpages; i++) {
-               pages[i] = alloc_page(GFP_IOFS);
+               pages[i] = alloc_page(GFP_KERNEL);
                if (pages[i] == NULL) {
                        rc = -ENOMEM;
                        goto out;
@@ -1466,7 +1466,7 @@ static int mgc_process_cfg_log(struct obd_device *mgc,
        if (cld->cld_cfg.cfg_sb)
                lsi = s2lsi(cld->cld_cfg.cfg_sb);
 
-       env = kzalloc(sizeof(*env), GFP_NOFS);
+       env = kzalloc(sizeof(*env), GFP_KERNEL);
        if (!env)
                return -ENOMEM;
 
index b6f000bb8c825638b002344d4430fa871f64eeb9..f61ef669644cdadfc10c54539c5743c012082d09 100644 (file)
@@ -1562,7 +1562,7 @@ static int echo_client_kbrw(struct echo_device *ed, int rw, struct obdo *oa,
                  (oa->o_valid & OBD_MD_FLFLAGS) != 0 &&
                  (oa->o_flags & OBD_FL_DEBUG_CHECK) != 0);
 
-       gfp_mask = ((ostid_id(&oa->o_oi) & 2) == 0) ? GFP_IOFS : GFP_HIGHUSER;
+       gfp_mask = ((ostid_id(&oa->o_oi) & 2) == 0) ? GFP_KERNEL : GFP_HIGHUSER;
 
        LASSERT(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ);
        LASSERT(lsm != NULL);
index cfb83bcfcb17525ac99e7f08b428fde98e86316c..b1d1a87f05e337b4aec56d8f170845080f90f563 100644 (file)
@@ -346,7 +346,7 @@ static struct osc_extent *osc_extent_alloc(struct osc_object *obj)
 {
        struct osc_extent *ext;
 
-       ext = kmem_cache_alloc(osc_extent_kmem, GFP_IOFS | __GFP_ZERO);
+       ext = kmem_cache_alloc(osc_extent_kmem, GFP_NOFS | __GFP_ZERO);
        if (ext == NULL)
                return NULL;
 
index b56e811b6f7c77f91a3535da405c919574c2f4f7..86f9f7da86ea8fedc7ebfe80b668843eb5d5cb6c 100644 (file)
@@ -134,7 +134,6 @@ struct vm_area_struct;
 #define GFP_USER       (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL)
 #define GFP_HIGHUSER   (GFP_USER | __GFP_HIGHMEM)
 #define GFP_HIGHUSER_MOVABLE   (GFP_HIGHUSER | __GFP_MOVABLE)
-#define GFP_IOFS       (__GFP_IO | __GFP_FS | __GFP_KSWAPD_RECLAIM)
 #define GFP_TRANSHUGE  ((GFP_HIGHUSER_MOVABLE | __GFP_COMP | \
                         __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN) & \
                         ~__GFP_KSWAPD_RECLAIM)