diff options
author | NeilBrown <neilb@suse.com> | 2018-01-09 12:19:38 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-09 15:41:57 +0100 |
commit | d0157f0c7ef02e022a6dc063ddece4a28004c710 (patch) | |
tree | 4d47ed4f195883b68a4b3e2864a7c4e775fdaeef /drivers/staging/lustre | |
parent | 4c03f554bfed0ed1bbc51492b63da64153b3bbbf (diff) | |
download | linux-stable-d0157f0c7ef02e022a6dc063ddece4a28004c710.tar.gz linux-stable-d0157f0c7ef02e022a6dc063ddece4a28004c710.tar.bz2 linux-stable-d0157f0c7ef02e022a6dc063ddece4a28004c710.zip |
staging: lustre: opencode LIBCFS_ALLOC_ATOMIC calls.
Just call kzalloc(GFP_ATOMIC) directly.
We don't need the warning on failure.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r-- | drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c index 85483a38c6c4..e1f4ef2bddd4 100644 --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c @@ -1093,7 +1093,7 @@ int lprocfs_stats_alloc_one(struct lprocfs_stats *stats, unsigned int cpuid) LASSERT((stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) == 0); percpusize = lprocfs_stats_counter_size(stats); - LIBCFS_ALLOC_ATOMIC(stats->ls_percpu[cpuid], percpusize); + stats->ls_percpu[cpuid] = kzalloc(percpusize, GFP_ATOMIC); if (stats->ls_percpu[cpuid]) { rc = 0; if (unlikely(stats->ls_biggest_alloc_num <= cpuid)) { @@ -1156,7 +1156,7 @@ struct lprocfs_stats *lprocfs_alloc_stats(unsigned int num, if ((flags & LPROCFS_STATS_FLAG_NOPERCPU) != 0) { /* contains only one set counters */ percpusize = lprocfs_stats_counter_size(stats); - LIBCFS_ALLOC_ATOMIC(stats->ls_percpu[0], percpusize); + stats->ls_percpu[0] = kzalloc(percpusize, GFP_ATOMIC); if (!stats->ls_percpu[0]) goto fail; stats->ls_biggest_alloc_num = 1; @@ -1193,8 +1193,7 @@ void lprocfs_free_stats(struct lprocfs_stats **statsh) percpusize = lprocfs_stats_counter_size(stats); for (i = 0; i < num_entry; i++) - if (stats->ls_percpu[i]) - LIBCFS_FREE(stats->ls_percpu[i], percpusize); + kfree(stats->ls_percpu[i]); kvfree(stats->ls_cnt_header); kvfree(stats); } |