diff options
Diffstat (limited to 'fs/jfs')
| -rw-r--r-- | fs/jfs/jfs_dmap.c | 4 | ||||
| -rw-r--r-- | fs/jfs/jfs_imap.c | 2 | ||||
| -rw-r--r-- | fs/jfs/jfs_logmgr.c | 8 | ||||
| -rw-r--r-- | fs/jfs/jfs_metapage.c | 2 | ||||
| -rw-r--r-- | fs/jfs/super.c | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index cdfa699cd7c8..368fcdd8c328 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -161,7 +161,7 @@ int dbMount(struct inode *ipbmap) * allocate/initialize the in-memory bmap descriptor */ /* allocate memory for the in-memory bmap descriptor */ - bmp = kmalloc(sizeof(struct bmap), GFP_KERNEL); + bmp = kmalloc_obj(struct bmap, GFP_KERNEL); if (bmp == NULL) return -ENOMEM; @@ -1593,7 +1593,7 @@ s64 dbDiscardAG(struct inode *ip, int agno, s64 minlen) max_ranges = nblocks; do_div(max_ranges, minlen); range_cnt = min_t(u64, max_ranges + 1, 32 * 1024); - totrim = kmalloc_array(range_cnt, sizeof(struct range2trim), GFP_NOFS); + totrim = kmalloc_objs(struct range2trim, range_cnt, GFP_NOFS); if (totrim == NULL) { jfs_error(bmp->db_ipbmap->i_sb, "no memory for trim array\n"); IWRITE_UNLOCK(ipbmap); diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index ecb8e05b8b84..739fcb4a6fc8 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c @@ -102,7 +102,7 @@ int diMount(struct inode *ipimap) * allocate/initialize the in-memory inode map control structure */ /* allocate the in-memory inode map control structure. */ - imap = kzalloc(sizeof(struct inomap), GFP_KERNEL); + imap = kzalloc_obj(struct inomap, GFP_KERNEL); if (imap == NULL) return -ENOMEM; diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 5b1c5da04163..204cca8dd5d4 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c @@ -1087,7 +1087,7 @@ int lmLogOpen(struct super_block *sb) } } - if (!(log = kzalloc(sizeof(struct jfs_log), GFP_KERNEL))) { + if (!(log = kzalloc_obj(struct jfs_log, GFP_KERNEL))) { mutex_unlock(&jfs_log_mutex); return -ENOMEM; } @@ -1156,7 +1156,7 @@ static int open_inline_log(struct super_block *sb) struct jfs_log *log; int rc; - if (!(log = kzalloc(sizeof(struct jfs_log), GFP_KERNEL))) + if (!(log = kzalloc_obj(struct jfs_log, GFP_KERNEL))) return -ENOMEM; INIT_LIST_HEAD(&log->sb_list); init_waitqueue_head(&log->syncwait); @@ -1190,7 +1190,7 @@ static int open_dummy_log(struct super_block *sb) mutex_lock(&jfs_log_mutex); if (!dummy_log) { - dummy_log = kzalloc(sizeof(struct jfs_log), GFP_KERNEL); + dummy_log = kzalloc_obj(struct jfs_log, GFP_KERNEL); if (!dummy_log) { mutex_unlock(&jfs_log_mutex); return -ENOMEM; @@ -1818,7 +1818,7 @@ static int lbmLogInit(struct jfs_log * log) goto error; buffer = page_address(page); for (offset = 0; offset < PAGE_SIZE; offset += LOGPSIZE) { - lbuf = kmalloc(sizeof(struct lbuf), GFP_KERNEL); + lbuf = kmalloc_obj(struct lbuf, GFP_KERNEL); if (lbuf == NULL) { if (offset == 0) __free_page(page); diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 871cf4fb3636..64c6eaa7f3f2 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c @@ -98,7 +98,7 @@ static inline int insert_metapage(struct folio *folio, struct metapage *mp) a = folio->private; if (!a) { - a = kzalloc(sizeof(struct meta_anchor), GFP_NOFS); + a = kzalloc_obj(struct meta_anchor, GFP_NOFS); if (!a) return -ENOMEM; folio_attach_private(folio, a); diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 3cfb86c5a36e..4c1510091fe2 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -449,7 +449,7 @@ static int jfs_fill_super(struct super_block *sb, struct fs_context *fc) jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags); - sbi = kzalloc(sizeof(struct jfs_sb_info), GFP_KERNEL); + sbi = kzalloc_obj(struct jfs_sb_info, GFP_KERNEL); if (!sbi) return -ENOMEM; @@ -912,7 +912,7 @@ static int jfs_init_fs_context(struct fs_context *fc) { struct jfs_context *ctx; - ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); + ctx = kzalloc_obj(*ctx, GFP_KERNEL); if (!ctx) return -ENOMEM; |
