diff options
| author | Agatha Isabelle Moreira <code@agatha.dev> | 2026-05-20 23:05:46 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-05-27 16:11:02 +0300 |
| commit | 2fddb8479d000aca35ed34243982a9ba141808c4 (patch) | |
| tree | 83c1cba6f8aa1cddfde46ec007840eb5fa63725c /include/linux/debugobjects.h | |
| parent | 0432b89f6158f18618ac46a322c2f2dddd4adfc5 (diff) | |
| download | linux-2fddb8479d000aca35ed34243982a9ba141808c4.tar.xz | |
fs: jbd2: use clear_and_wake_up_bit() in journal_end_buffer_io_sync()
Use `clear_and_wake_up_bit()` in `journal_end_buffer_io_sync()`, since
the helper was introduced in 'commit 8236b0ae31c83 ("bdi: wake up
concurrent wb_shutdown() callers.")' as a generic way of doing the same
sequence of operations:
clear_bit_unlock();
smp_mb__after_atomic();
wake_up_bit();
The helper was first implemented to avoid bugs caused by forgetting to
call `wake_up_bit()` after `clear_bit_unlock()`.
Since `journal_end_buffer_io_sync()` was first introduced by 'commit
470decc613ab2 ("jbd2: initial copy of files from jbd")' and last
modified in this operation by 'commit 4e857c58efeb9 ("arch: Mass
conversion of smp_mb__*()")', years before `clear_and_wake_up_bit()`, it
still uses the open-coded sequence.
Replace the open-coded sequence with the helper to avoid duplicate code
and reduce code paths to maintain.
Suggested-by: shuo chen <1289151713@qq.com>
Link: https://lore.kernel.org/kernelnewbies/agzoqV835-co4kAN@guidai/T/#t
Signed-off-by: Agatha Isabelle Moreira <code@agatha.dev>
Link: https://patch.msgid.link/ag4SrrOl7R2DcLLi@guidai
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
