diff options
Diffstat (limited to 'fs/nfsd/blocklayout.c')
| -rw-r--r-- | fs/nfsd/blocklayout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c index afa16d7a8013..e3553ccb6ab4 100644 --- a/fs/nfsd/blocklayout.c +++ b/fs/nfsd/blocklayout.c @@ -131,7 +131,7 @@ nfsd4_block_proc_layoutget(struct svc_rqst *rqstp, struct inode *inode, * layouts, so make sure to zero the whole structure. */ nfserr = nfserrno(-ENOMEM); - bl = kzalloc(struct_size(bl, extents, nr_extents_max), GFP_KERNEL); + bl = kzalloc_flex(*bl, extents, nr_extents_max, GFP_KERNEL); if (!bl) goto out_error; bl->nr_extents = nr_extents_max; @@ -208,7 +208,7 @@ nfsd4_block_get_device_info_simple(struct super_block *sb, struct pnfs_block_deviceaddr *dev; struct pnfs_block_volume *b; - dev = kzalloc(struct_size(dev, volumes, 1), GFP_KERNEL); + dev = kzalloc_flex(*dev, volumes, 1, GFP_KERNEL); if (!dev) return -ENOMEM; gdp->gd_device = dev; @@ -319,7 +319,7 @@ nfsd4_block_get_device_info_scsi(struct super_block *sb, const struct pr_ops *ops; int ret; - dev = kzalloc(struct_size(dev, volumes, 1), GFP_KERNEL); + dev = kzalloc_flex(*dev, volumes, 1, GFP_KERNEL); if (!dev) return -ENOMEM; gdp->gd_device = dev; |
