* [PATCH 0/6] treewide: kmem_cache_alloc GFP_ZERO cleanups
@ 2013-08-29 20:11 ` Joe Perches
0 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel
Cc: intel-gfx, dri-devel, linux-fsdevel, linux-aio, ceph-devel,
linux-f2fs-devel, linux-mm
Just a few cleanups to use zalloc style calls and reduce
the uses of __GFP_ZERO for kmem_cache_alloc[_node] uses.
Use the more kernel normal zalloc style.
Joe Perches (6):
slab/block: Add and use kmem_cache_zalloc_node
block: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
i915_gem: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
aio: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
ceph: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
f2fs: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
block/blk-core.c | 3 +--
block/blk-integrity.c | 3 +--
block/blk-ioc.c | 6 ++----
block/cfq-iosched.c | 10 ++++------
drivers/gpu/drm/i915/i915_gem.c | 2 +-
fs/aio.c | 2 +-
fs/ceph/dir.c | 2 +-
fs/ceph/file.c | 2 +-
fs/f2fs/super.c | 2 +-
include/linux/slab.h | 5 +++++
10 files changed, 18 insertions(+), 19 deletions(-)
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 0/6] treewide: kmem_cache_alloc GFP_ZERO cleanups
@ 2013-08-29 20:11 ` Joe Perches
0 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel
Cc: intel-gfx, dri-devel, linux-fsdevel, linux-aio, ceph-devel,
linux-f2fs-devel, linux-mm
Just a few cleanups to use zalloc style calls and reduce
the uses of __GFP_ZERO for kmem_cache_alloc[_node] uses.
Use the more kernel normal zalloc style.
Joe Perches (6):
slab/block: Add and use kmem_cache_zalloc_node
block: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
i915_gem: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
aio: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
ceph: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
f2fs: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
block/blk-core.c | 3 +--
block/blk-integrity.c | 3 +--
block/blk-ioc.c | 6 ++----
block/cfq-iosched.c | 10 ++++------
drivers/gpu/drm/i915/i915_gem.c | 2 +-
fs/aio.c | 2 +-
fs/ceph/dir.c | 2 +-
fs/ceph/file.c | 2 +-
fs/f2fs/super.c | 2 +-
include/linux/slab.h | 5 +++++
10 files changed, 18 insertions(+), 19 deletions(-)
--
1.8.1.2.459.gbcd45b4.dirty
--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org. For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 0/6] treewide: kmem_cache_alloc GFP_ZERO cleanups
@ 2013-08-29 20:11 ` Joe Perches
0 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel
Cc: intel-gfx, dri-devel, linux-fsdevel, linux-aio, ceph-devel,
linux-f2fs-devel, linux-mm
Just a few cleanups to use zalloc style calls and reduce
the uses of __GFP_ZERO for kmem_cache_alloc[_node] uses.
Use the more kernel normal zalloc style.
Joe Perches (6):
slab/block: Add and use kmem_cache_zalloc_node
block: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
i915_gem: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
aio: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
ceph: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
f2fs: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
block/blk-core.c | 3 +--
block/blk-integrity.c | 3 +--
block/blk-ioc.c | 6 ++----
block/cfq-iosched.c | 10 ++++------
drivers/gpu/drm/i915/i915_gem.c | 2 +-
fs/aio.c | 2 +-
fs/ceph/dir.c | 2 +-
fs/ceph/file.c | 2 +-
fs/f2fs/super.c | 2 +-
include/linux/slab.h | 5 +++++
10 files changed, 18 insertions(+), 19 deletions(-)
--
1.8.1.2.459.gbcd45b4.dirty
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/6] slab/block: Add and use kmem_cache_zalloc_node
2013-08-29 20:11 ` Joe Perches
@ 2013-08-29 20:11 ` Joe Perches
-1 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel
Cc: Jens Axboe, Christoph Lameter, Pekka Enberg, Matt Mackall, linux-mm
Create and use kmem_cache_zalloc_node utility to be
acompatible style with all the zalloc equivalents
for kmem_cache_zalloc.
Reduce the uses of __GFP_ZERO.
Signed-off-by: Joe Perches <joe@perches.com>
---
block/blk-core.c | 3 +--
block/blk-ioc.c | 6 ++----
block/cfq-iosched.c | 10 ++++------
include/linux/slab.h | 5 +++++
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 3182734..eb7cad2 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -591,8 +591,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
struct request_queue *q;
int err;
- q = kmem_cache_alloc_node(blk_requestq_cachep,
- gfp_mask | __GFP_ZERO, node_id);
+ q = kmem_cache_zalloc_node(blk_requestq_cachep, gfp_mask, node_id);
if (!q)
return NULL;
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 46cd7bd..3163751 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -237,8 +237,7 @@ int create_task_io_context(struct task_struct *task, gfp_t gfp_flags, int node)
struct io_context *ioc;
int ret;
- ioc = kmem_cache_alloc_node(iocontext_cachep, gfp_flags | __GFP_ZERO,
- node);
+ ioc = kmem_cache_zalloc_node(iocontext_cachep, gfp_flags, node);
if (unlikely(!ioc))
return -ENOMEM;
@@ -362,8 +361,7 @@ struct io_cq *ioc_create_icq(struct io_context *ioc, struct request_queue *q,
struct io_cq *icq;
/* allocate stuff */
- icq = kmem_cache_alloc_node(et->icq_cache, gfp_mask | __GFP_ZERO,
- q->node);
+ icq = kmem_cache_zalloc_node(et->icq_cache, gfp_mask, q->node);
if (!icq)
return NULL;
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index dabb9d0..42a52d5 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -3584,18 +3584,16 @@ retry:
} else if (gfp_mask & __GFP_WAIT) {
rcu_read_unlock();
spin_unlock_irq(cfqd->queue->queue_lock);
- new_cfqq = kmem_cache_alloc_node(cfq_pool,
- gfp_mask | __GFP_ZERO,
- cfqd->queue->node);
+ new_cfqq = kmem_cache_zalloc_node(cfq_pool, gfp_mask,
+ cfqd->queue->node);
spin_lock_irq(cfqd->queue->queue_lock);
if (new_cfqq)
goto retry;
else
return &cfqd->oom_cfqq;
} else {
- cfqq = kmem_cache_alloc_node(cfq_pool,
- gfp_mask | __GFP_ZERO,
- cfqd->queue->node);
+ cfqq = kmem_cache_zalloc_node(cfq_pool, gfp_mask,
+ cfqd->queue->node);
}
if (cfqq) {
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 6c5cc0e..48b7484 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -536,6 +536,11 @@ static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
return kmem_cache_alloc(k, flags | __GFP_ZERO);
}
+static inline void *kmem_cache_zalloc_node(struct kmem_cache *k, gfp_t flags,
+ int node)
+{
+ return kmem_cache_alloc_node(k, flags | __GFP_ZERO, node);
+}
/**
* kzalloc - allocate memory. The memory is set to zero.
* @size: how many bytes of memory are required.
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 1/6] slab/block: Add and use kmem_cache_zalloc_node
@ 2013-08-29 20:11 ` Joe Perches
0 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel
Cc: Jens Axboe, Christoph Lameter, Pekka Enberg, Matt Mackall, linux-mm
Create and use kmem_cache_zalloc_node utility to be
acompatible style with all the zalloc equivalents
for kmem_cache_zalloc.
Reduce the uses of __GFP_ZERO.
Signed-off-by: Joe Perches <joe@perches.com>
---
block/blk-core.c | 3 +--
block/blk-ioc.c | 6 ++----
block/cfq-iosched.c | 10 ++++------
include/linux/slab.h | 5 +++++
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 3182734..eb7cad2 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -591,8 +591,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
struct request_queue *q;
int err;
- q = kmem_cache_alloc_node(blk_requestq_cachep,
- gfp_mask | __GFP_ZERO, node_id);
+ q = kmem_cache_zalloc_node(blk_requestq_cachep, gfp_mask, node_id);
if (!q)
return NULL;
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 46cd7bd..3163751 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -237,8 +237,7 @@ int create_task_io_context(struct task_struct *task, gfp_t gfp_flags, int node)
struct io_context *ioc;
int ret;
- ioc = kmem_cache_alloc_node(iocontext_cachep, gfp_flags | __GFP_ZERO,
- node);
+ ioc = kmem_cache_zalloc_node(iocontext_cachep, gfp_flags, node);
if (unlikely(!ioc))
return -ENOMEM;
@@ -362,8 +361,7 @@ struct io_cq *ioc_create_icq(struct io_context *ioc, struct request_queue *q,
struct io_cq *icq;
/* allocate stuff */
- icq = kmem_cache_alloc_node(et->icq_cache, gfp_mask | __GFP_ZERO,
- q->node);
+ icq = kmem_cache_zalloc_node(et->icq_cache, gfp_mask, q->node);
if (!icq)
return NULL;
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index dabb9d0..42a52d5 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -3584,18 +3584,16 @@ retry:
} else if (gfp_mask & __GFP_WAIT) {
rcu_read_unlock();
spin_unlock_irq(cfqd->queue->queue_lock);
- new_cfqq = kmem_cache_alloc_node(cfq_pool,
- gfp_mask | __GFP_ZERO,
- cfqd->queue->node);
+ new_cfqq = kmem_cache_zalloc_node(cfq_pool, gfp_mask,
+ cfqd->queue->node);
spin_lock_irq(cfqd->queue->queue_lock);
if (new_cfqq)
goto retry;
else
return &cfqd->oom_cfqq;
} else {
- cfqq = kmem_cache_alloc_node(cfq_pool,
- gfp_mask | __GFP_ZERO,
- cfqd->queue->node);
+ cfqq = kmem_cache_zalloc_node(cfq_pool, gfp_mask,
+ cfqd->queue->node);
}
if (cfqq) {
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 6c5cc0e..48b7484 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -536,6 +536,11 @@ static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
return kmem_cache_alloc(k, flags | __GFP_ZERO);
}
+static inline void *kmem_cache_zalloc_node(struct kmem_cache *k, gfp_t flags,
+ int node)
+{
+ return kmem_cache_alloc_node(k, flags | __GFP_ZERO, node);
+}
/**
* kzalloc - allocate memory. The memory is set to zero.
* @size: how many bytes of memory are required.
--
1.8.1.2.459.gbcd45b4.dirty
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/6] block: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
2013-08-29 20:11 ` Joe Perches
` (2 preceding siblings ...)
(?)
@ 2013-08-29 20:11 ` Joe Perches
-1 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Jens Axboe
The helper exists, might as well use it instead of __GFP_ZERO.
Signed-off-by: Joe Perches <joe@perches.com>
---
block/blk-integrity.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/blk-integrity.c b/block/blk-integrity.c
index 03cf717..b97f2e2 100644
--- a/block/blk-integrity.c
+++ b/block/blk-integrity.c
@@ -388,8 +388,7 @@ int blk_integrity_register(struct gendisk *disk, struct blk_integrity *template)
BUG_ON(disk == NULL);
if (disk->integrity == NULL) {
- bi = kmem_cache_alloc(integrity_cachep,
- GFP_KERNEL | __GFP_ZERO);
+ bi = kmem_cache_zalloc(integrity_cachep, GFP_KERNEL);
if (!bi)
return -1;
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/6] i915_gem: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
2013-08-29 20:11 ` Joe Perches
` (3 preceding siblings ...)
(?)
@ 2013-08-29 20:11 ` Joe Perches
2013-08-29 20:39 ` Daniel Vetter
-1 siblings, 1 reply; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Daniel Vetter, David Airlie, intel-gfx, dri-devel
The helper exists, might as well use it instead of __GFP_ZERO.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/gpu/drm/i915/i915_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 8a0eb96..c4acd96 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -214,7 +214,7 @@ i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data,
void *i915_gem_object_alloc(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
- return kmem_cache_alloc(dev_priv->slab, GFP_KERNEL | __GFP_ZERO);
+ return kmem_cache_zalloc(dev_priv->slab, GFP_KERNEL);
}
void i915_gem_object_free(struct drm_i915_gem_object *obj)
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/6] aio: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
2013-08-29 20:11 ` Joe Perches
@ 2013-08-29 20:11 ` Joe Perches
-1 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Alexander Viro, Benjamin LaHaise, linux-fsdevel, linux-aio
The helper exists, might as well use it instead of __GFP_ZERO.
Signed-off-by: Joe Perches <joe@perches.com>
---
fs/aio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/aio.c b/fs/aio.c
index 9f783e3..f680878 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -774,7 +774,7 @@ static inline struct kiocb *aio_get_req(struct kioctx *ctx)
if (!get_reqs_available(ctx))
return NULL;
- req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL|__GFP_ZERO);
+ req = kmem_cache_zalloc(kiocb_cachep, GFP_KERNEL);
if (unlikely(!req))
goto out_put;
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/6] aio: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
@ 2013-08-29 20:11 ` Joe Perches
0 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Alexander Viro, Benjamin LaHaise, linux-fsdevel, linux-aio
The helper exists, might as well use it instead of __GFP_ZERO.
Signed-off-by: Joe Perches <joe@perches.com>
---
fs/aio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/aio.c b/fs/aio.c
index 9f783e3..f680878 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -774,7 +774,7 @@ static inline struct kiocb *aio_get_req(struct kioctx *ctx)
if (!get_reqs_available(ctx))
return NULL;
- req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL|__GFP_ZERO);
+ req = kmem_cache_zalloc(kiocb_cachep, GFP_KERNEL);
if (unlikely(!req))
goto out_put;
--
1.8.1.2.459.gbcd45b4.dirty
--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org. For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/6] ceph: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
2013-08-29 20:11 ` Joe Perches
` (5 preceding siblings ...)
(?)
@ 2013-08-29 20:11 ` Joe Perches
-1 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Sage Weil, ceph-devel
The helper exists, might as well use it instead of __GFP_ZERO.
Signed-off-by: Joe Perches <joe@perches.com>
---
fs/ceph/dir.c | 2 +-
fs/ceph/file.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 868b61d..c10bc70 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -40,7 +40,7 @@ int ceph_init_dentry(struct dentry *dentry)
if (dentry->d_fsdata)
return 0;
- di = kmem_cache_alloc(ceph_dentry_cachep, GFP_NOFS | __GFP_ZERO);
+ di = kmem_cache_zalloc(ceph_dentry_cachep, GFP_NOFS);
if (!di)
return -ENOMEM; /* oh well */
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 20d0222..1b5f8ec 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -75,7 +75,7 @@ static int ceph_init_file(struct inode *inode, struct file *file, int fmode)
case S_IFDIR:
dout("init_file %p %p 0%o (regular)\n", inode, file,
inode->i_mode);
- cf = kmem_cache_alloc(ceph_file_cachep, GFP_NOFS | __GFP_ZERO);
+ cf = kmem_cache_zalloc(ceph_file_cachep, GFP_NOFS);
if (cf == NULL) {
ceph_put_fmode(ceph_inode(inode), fmode); /* clean up */
return -ENOMEM;
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 6/6] f2fs: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
2013-08-29 20:11 ` Joe Perches
@ 2013-08-29 20:11 ` Joe Perches
-1 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Jaegeuk Kim, linux-f2fs-devel
The helper exists, might as well use it instead of __GFP_ZERO.
Signed-off-by: Joe Perches <joe@perches.com>
---
fs/f2fs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 13d0a0f..d43709a 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -286,7 +286,7 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb)
{
struct f2fs_inode_info *fi;
- fi = kmem_cache_alloc(f2fs_inode_cachep, GFP_NOFS | __GFP_ZERO);
+ fi = kmem_cache_zalloc(f2fs_inode_cachep, GFP_NOFS);
if (!fi)
return NULL;
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 6/6] f2fs: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
@ 2013-08-29 20:11 ` Joe Perches
0 siblings, 0 replies; 15+ messages in thread
From: Joe Perches @ 2013-08-29 20:11 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-f2fs-devel
The helper exists, might as well use it instead of __GFP_ZERO.
Signed-off-by: Joe Perches <joe@perches.com>
---
fs/f2fs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 13d0a0f..d43709a 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -286,7 +286,7 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb)
{
struct f2fs_inode_info *fi;
- fi = kmem_cache_alloc(f2fs_inode_cachep, GFP_NOFS | __GFP_ZERO);
+ fi = kmem_cache_zalloc(f2fs_inode_cachep, GFP_NOFS);
if (!fi)
return NULL;
--
1.8.1.2.459.gbcd45b4.dirty
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 3/6] i915_gem: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc
2013-08-29 20:11 ` [PATCH 3/6] i915_gem: " Joe Perches
@ 2013-08-29 20:39 ` Daniel Vetter
0 siblings, 0 replies; 15+ messages in thread
From: Daniel Vetter @ 2013-08-29 20:39 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel, Daniel Vetter, David Airlie, intel-gfx, dri-devel
On Thu, Aug 29, 2013 at 01:11:07PM -0700, Joe Perches wrote:
> The helper exists, might as well use it instead of __GFP_ZERO.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/6] slab/block: Add and use kmem_cache_zalloc_node
2013-08-29 20:11 ` Joe Perches
@ 2013-08-30 13:37 ` Christoph Lameter
-1 siblings, 0 replies; 15+ messages in thread
From: Christoph Lameter @ 2013-08-30 13:37 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel, Jens Axboe, Pekka Enberg, Matt Mackall, linux-mm
On Thu, 29 Aug 2013, Joe Perches wrote:
> Create and use kmem_cache_zalloc_node utility to be
> acompatible style with all the zalloc equivalents
> for kmem_cache_zalloc.
Well I thought more along the lines of dropping the *_zalloc in favor of
__GFP_ZERO but if this is more convenient then I have no objections.
Acked-by: Christoph Lameter <cl@linux.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/6] slab/block: Add and use kmem_cache_zalloc_node
@ 2013-08-30 13:37 ` Christoph Lameter
0 siblings, 0 replies; 15+ messages in thread
From: Christoph Lameter @ 2013-08-30 13:37 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel, Jens Axboe, Pekka Enberg, Matt Mackall, linux-mm
On Thu, 29 Aug 2013, Joe Perches wrote:
> Create and use kmem_cache_zalloc_node utility to be
> acompatible style with all the zalloc equivalents
> for kmem_cache_zalloc.
Well I thought more along the lines of dropping the *_zalloc in favor of
__GFP_ZERO but if this is more convenient then I have no objections.
Acked-by: Christoph Lameter <cl@linux.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-08-30 13:47 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-29 20:11 [PATCH 0/6] treewide: kmem_cache_alloc GFP_ZERO cleanups Joe Perches
2013-08-29 20:11 ` Joe Perches
2013-08-29 20:11 ` Joe Perches
2013-08-29 20:11 ` [PATCH 1/6] slab/block: Add and use kmem_cache_zalloc_node Joe Perches
2013-08-29 20:11 ` Joe Perches
2013-08-30 13:37 ` Christoph Lameter
2013-08-30 13:37 ` Christoph Lameter
2013-08-29 20:11 ` [PATCH 2/6] block: Convert kmem_cache_alloc(...GFP_ZERO) to kmem_cache_zalloc Joe Perches
2013-08-29 20:11 ` [PATCH 3/6] i915_gem: " Joe Perches
2013-08-29 20:39 ` Daniel Vetter
2013-08-29 20:11 ` [PATCH 4/6] aio: " Joe Perches
2013-08-29 20:11 ` Joe Perches
2013-08-29 20:11 ` [PATCH 5/6] ceph: " Joe Perches
2013-08-29 20:11 ` [PATCH 6/6] f2fs: " Joe Perches
2013-08-29 20:11 ` Joe Perches
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.