summaryrefslogtreecommitdiff
path: root/fs/ntfs3/fslog.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ntfs3/fslog.c')
-rw-r--r--fs/ntfs3/fslog.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/ntfs3/fslog.c b/fs/ntfs3/fslog.c
index 10863c83c315..272e45276143 100644
--- a/fs/ntfs3/fslog.c
+++ b/fs/ntfs3/fslog.c
@@ -2473,7 +2473,7 @@ static int read_log_rec_lcb(struct ntfs_log *log, u64 lsn, u32 ctx_mode,
if (!verify_client_lsn(log, cr, lsn))
return -EINVAL;
- lcb = kzalloc(sizeof(struct lcb), GFP_NOFS);
+ lcb = kzalloc_obj(struct lcb, GFP_NOFS);
if (!lcb)
return -ENOMEM;
lcb->client = log->client_id;
@@ -3117,8 +3117,7 @@ static int do_action(struct ntfs_log *log, struct OPEN_ATTR_ENRTY *oe,
/* Read from disk. */
err = mi_get(sbi, rno, &mi);
if (err && op == InitializeFileRecordSegment) {
- mi = kzalloc(sizeof(struct mft_inode),
- GFP_NOFS);
+ mi = kzalloc_obj(struct mft_inode, GFP_NOFS);
if (!mi)
return -ENOMEM;
err = mi_format_new(mi, sbi, rno, 0, false);
@@ -3779,7 +3778,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
u16 t16;
u32 t32;
- log = kzalloc(sizeof(struct ntfs_log), GFP_NOFS);
+ log = kzalloc_obj(struct ntfs_log, GFP_NOFS);
if (!log)
return -ENOMEM;
@@ -4725,7 +4724,7 @@ next_open_attribute:
goto next_dirty_page;
}
- oa = kzalloc(sizeof(struct OpenAttr), GFP_NOFS);
+ oa = kzalloc_obj(struct OpenAttr, GFP_NOFS);
if (!oa) {
err = -ENOMEM;
goto out;