summaryrefslogtreecommitdiff
path: root/fs/nilfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2')
-rw-r--r--fs/nilfs2/alloc.c2
-rw-r--r--fs/nilfs2/recovery.c4
-rw-r--r--fs/nilfs2/segment.c2
-rw-r--r--fs/nilfs2/super.c2
-rw-r--r--fs/nilfs2/the_nilfs.c4
5 files changed, 7 insertions, 7 deletions
diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c
index 6b506995818d..e7eebb04f9a4 100644
--- a/fs/nilfs2/alloc.c
+++ b/fs/nilfs2/alloc.c
@@ -54,7 +54,7 @@ int nilfs_palloc_init_blockgroup(struct inode *inode, unsigned int entry_size)
{
struct nilfs_mdt_info *mi = NILFS_MDT(inode);
- mi->mi_bgl = kmalloc(sizeof(*mi->mi_bgl), GFP_NOFS);
+ mi->mi_bgl = kmalloc_obj(*mi->mi_bgl, GFP_NOFS);
if (!mi->mi_bgl)
return -ENOMEM;
diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c
index a9c61d0492cb..4d5a6aa5214c 100644
--- a/fs/nilfs2/recovery.c
+++ b/fs/nilfs2/recovery.c
@@ -370,7 +370,7 @@ static int nilfs_scan_dsync_log(struct the_nilfs *nilfs, sector_t start_blocknr,
if (unlikely(!binfo))
goto out;
- rb = kmalloc(sizeof(*rb), GFP_NOFS);
+ rb = kmalloc_obj(*rb, GFP_NOFS);
if (unlikely(!rb)) {
err = -ENOMEM;
goto out;
@@ -414,7 +414,7 @@ struct nilfs_segment_entry {
static int nilfs_segment_list_add(struct list_head *head, __u64 segnum)
{
- struct nilfs_segment_entry *ent = kmalloc(sizeof(*ent), GFP_NOFS);
+ struct nilfs_segment_entry *ent = kmalloc_obj(*ent, GFP_NOFS);
if (unlikely(!ent))
return -ENOMEM;
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index deee16bc9d4e..21c5539c7e84 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -2701,7 +2701,7 @@ static struct nilfs_sc_info *nilfs_segctor_new(struct super_block *sb,
struct the_nilfs *nilfs = sb->s_fs_info;
struct nilfs_sc_info *sci;
- sci = kzalloc(sizeof(*sci), GFP_KERNEL);
+ sci = kzalloc_obj(*sci, GFP_KERNEL);
if (!sci)
return NULL;
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index badc2cbc895e..55fac3f83232 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -1292,7 +1292,7 @@ static int nilfs_init_fs_context(struct fs_context *fc)
{
struct nilfs_fs_context *ctx;
- ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx, GFP_KERNEL);
if (!ctx)
return -ENOMEM;
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c
index d0bcf744c553..f481532ea8e9 100644
--- a/fs/nilfs2/the_nilfs.c
+++ b/fs/nilfs2/the_nilfs.c
@@ -56,7 +56,7 @@ struct the_nilfs *alloc_nilfs(struct super_block *sb)
{
struct the_nilfs *nilfs;
- nilfs = kzalloc(sizeof(*nilfs), GFP_KERNEL);
+ nilfs = kzalloc_obj(*nilfs, GFP_KERNEL);
if (!nilfs)
return NULL;
@@ -877,7 +877,7 @@ nilfs_find_or_create_root(struct the_nilfs *nilfs, __u64 cno)
if (root)
return root;
- new = kzalloc(sizeof(*root), GFP_KERNEL);
+ new = kzalloc_obj(*root, GFP_KERNEL);
if (!new)
return NULL;