diff options
| author | Nikolay Borisov <[email protected]> | 2017-06-20 21:01:20 +0300 |
|---|---|---|
| committer | Tejun Heo <[email protected]> | 2017-06-20 15:42:32 -0400 |
| commit | 104b4e5139fe384431ac11c3b8a6cf4a529edf4a (patch) | |
| tree | e8a0157f2294f006f31e535949327b3484a5dcb8 /include/linux/backing-dev.h | |
| parent | df95e795a722892a9e0603ce4b9b62fab9f02967 (diff) | |
percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch
Currently, percpu_counter_add is a wrapper around __percpu_counter_add
which is preempt safe due to explicit calls to preempt_disable. Given
how __ prefix is used in percpu related interfaces, the naming
unfortunately creates the false sense that __percpu_counter_add is
less safe than percpu_counter_add. In terms of context-safety,
they're equivalent. The only difference is that the __ version takes
a batch parameter.
Make this a bit more explicit by just renaming __percpu_counter_add to
percpu_counter_add_batch.
This patch doesn't cause any functional changes.
tj: Minor updates to patch description for clarity. Cosmetic
indentation updates.
Signed-off-by: Nikolay Borisov <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Josef Bacik <[email protected]>
Cc: David Sterba <[email protected]>
Cc: Darrick J. Wong <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: [email protected]
Cc: "David S. Miller" <[email protected]>
Diffstat (limited to 'include/linux/backing-dev.h')
| -rw-r--r-- | include/linux/backing-dev.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 557d84063934..ace73f96eb1e 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -66,7 +66,7 @@ static inline bool bdi_has_dirty_io(struct backing_dev_info *bdi) static inline void __add_wb_stat(struct bdi_writeback *wb, enum wb_stat_item item, s64 amount) { - __percpu_counter_add(&wb->stat[item], amount, WB_STAT_BATCH); + percpu_counter_add_batch(&wb->stat[item], amount, WB_STAT_BATCH); } static inline void __inc_wb_stat(struct bdi_writeback *wb, |
