diff options
Diffstat (limited to 'fs/netfs')
| -rw-r--r-- | fs/netfs/buffered_read.c | 2 | ||||
| -rw-r--r-- | fs/netfs/buffered_write.c | 2 | ||||
| -rw-r--r-- | fs/netfs/fscache_cache.c | 2 | ||||
| -rw-r--r-- | fs/netfs/fscache_io.c | 2 | ||||
| -rw-r--r-- | fs/netfs/fscache_volume.c | 3 | ||||
| -rw-r--r-- | fs/netfs/rolling_buffer.c | 2 |
6 files changed, 6 insertions, 7 deletions
diff --git a/fs/netfs/buffered_read.c b/fs/netfs/buffered_read.c index 37ab6f28b5ad..60073d41a387 100644 --- a/fs/netfs/buffered_read.c +++ b/fs/netfs/buffered_read.c @@ -429,7 +429,7 @@ static int netfs_read_gaps(struct file *file, struct folio *folio) * end get copied to, but the middle is discarded. */ ret = -ENOMEM; - bvec = kmalloc_array(nr_bvec, sizeof(*bvec), GFP_KERNEL); + bvec = kmalloc_objs(*bvec, nr_bvec, GFP_KERNEL); if (!bvec) goto discard; diff --git a/fs/netfs/buffered_write.c b/fs/netfs/buffered_write.c index f9d62abef2ac..8fe514447df6 100644 --- a/fs/netfs/buffered_write.c +++ b/fs/netfs/buffered_write.c @@ -302,7 +302,7 @@ ssize_t netfs_perform_write(struct kiocb *iocb, struct iov_iter *iter, goto copied; } - finfo = kzalloc(sizeof(*finfo), GFP_KERNEL); + finfo = kzalloc_obj(*finfo, GFP_KERNEL); if (!finfo) { iov_iter_revert(iter, copied); ret = -ENOMEM; diff --git a/fs/netfs/fscache_cache.c b/fs/netfs/fscache_cache.c index 8f70f8da064b..e709617b64d5 100644 --- a/fs/netfs/fscache_cache.c +++ b/fs/netfs/fscache_cache.c @@ -25,7 +25,7 @@ static struct fscache_cache *fscache_alloc_cache(const char *name) { struct fscache_cache *cache; - cache = kzalloc(sizeof(*cache), GFP_KERNEL); + cache = kzalloc_obj(*cache, GFP_KERNEL); if (cache) { if (name) { cache->name = kstrdup(name, GFP_KERNEL); diff --git a/fs/netfs/fscache_io.c b/fs/netfs/fscache_io.c index e4308457633c..37f05b4d3469 100644 --- a/fs/netfs/fscache_io.c +++ b/fs/netfs/fscache_io.c @@ -223,7 +223,7 @@ void __fscache_write_to_cache(struct fscache_cookie *cookie, _enter("%llx,%zx", start, len); - wreq = kzalloc(sizeof(struct fscache_write_request), GFP_NOFS); + wreq = kzalloc_obj(struct fscache_write_request, GFP_NOFS); if (!wreq) goto abandon; wreq->mapping = mapping; diff --git a/fs/netfs/fscache_volume.c b/fs/netfs/fscache_volume.c index ced14ac78cc1..57a9f12e79aa 100644 --- a/fs/netfs/fscache_volume.c +++ b/fs/netfs/fscache_volume.c @@ -230,8 +230,7 @@ static struct fscache_volume *fscache_alloc_volume(const char *volume_key, if (IS_ERR(cache)) return NULL; - volume = kzalloc(struct_size(volume, coherency, coherency_len), - GFP_KERNEL); + volume = kzalloc_flex(*volume, coherency, coherency_len, GFP_KERNEL); if (!volume) goto err_cache; diff --git a/fs/netfs/rolling_buffer.c b/fs/netfs/rolling_buffer.c index 207b6a326651..a17fbf9853a4 100644 --- a/fs/netfs/rolling_buffer.c +++ b/fs/netfs/rolling_buffer.c @@ -27,7 +27,7 @@ struct folio_queue *netfs_folioq_alloc(unsigned int rreq_id, gfp_t gfp, { struct folio_queue *fq; - fq = kmalloc(sizeof(*fq), gfp); + fq = kmalloc_obj(*fq, gfp); if (fq) { netfs_stat(&netfs_n_folioq); folioq_init(fq, rreq_id); |
