diff options
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayoutdev.c')
| -rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayoutdev.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index c2d8a13a9dbd..c40395ae0814 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -60,7 +60,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev, if (!scratch) goto out_err; - new_ds = kzalloc(sizeof(struct nfs4_ff_layout_ds), gfp_flags); + new_ds = kzalloc_obj(struct nfs4_ff_layout_ds, gfp_flags); if (!new_ds) goto out_scratch; @@ -99,9 +99,8 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev, version_count = be32_to_cpup(p); dprintk("%s: version count %d\n", __func__, version_count); - ds_versions = kcalloc(version_count, - sizeof(struct nfs4_ff_ds_version), - gfp_flags); + ds_versions = kzalloc_objs(struct nfs4_ff_ds_version, version_count, + gfp_flags); if (!ds_versions) goto out_err_drain_dsaddrs; @@ -262,7 +261,7 @@ int ff_layout_track_ds_error(struct nfs4_flexfile_layout *flo, if (IS_ERR_OR_NULL(mirror->dss[dss_id].mirror_ds)) return -EINVAL; - dserr = kmalloc(sizeof(*dserr), gfp_flags); + dserr = kmalloc_obj(*dserr, gfp_flags); if (!dserr) return -ENOMEM; |
