Linux EXT4 FS development
 help / color / mirror / Atom feed
* [PATCH 0/2] fs: refactor code to use clear_and_wake_up_bit()
@ 2026-05-20 19:45 Agatha Isabelle Moreira
  2026-05-20 19:58 ` [PATCH 1/2] fs: buffer: use clear_and_wake_up_bit() in unlock_buffer() Agatha Isabelle Moreira
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Agatha Isabelle Moreira @ 2026-05-20 19:45 UTC (permalink / raw)
  To: linux-fsdevel, linux-ext4, linux-kernel, Christian Brauner,
	Jan Kara, shuo chen, Theodore Ts'o, linux-kernel-mentees,
	shuah, patch-reply

Refactor code to use `clear_and_wake_up_bit()` instead of manual calls
to:
       	clear_bit_unlock();
	smp_mb__after_atomic();
	wake_up_bit();

The helper function `clear_and_wake_up_bit()` was introduced in
'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown()
callers.")' as a generic way of doing the same sequence of operations,
but several pieces of code still remain.

Replace manual calls to the operations by a single call to
`clear_and_wake_up_bit()` to deduplicate code and standardize pathways.

TESTING
=======
Boot-tested on an x86_64 QEMU virtual machine. Basic filesystem
operations (create, delete, sync) were performed on an ext4 filesystem
with `data=journal` modes. No issues were observed.

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>
---

Agatha Isabelle Moreira (2):
  fs: buffer: use clear_and_wake_up_bit() in unlock_buffer()
  fs: jbd2: use clear_and_wake_up_bit() in journal_end_buffer_io_sync()

 fs/buffer.c      | 4 +---
 fs/jbd2/commit.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-22 13:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20 19:45 [PATCH 0/2] fs: refactor code to use clear_and_wake_up_bit() Agatha Isabelle Moreira
2026-05-20 19:58 ` [PATCH 1/2] fs: buffer: use clear_and_wake_up_bit() in unlock_buffer() Agatha Isabelle Moreira
2026-05-20 20:05 ` [PATCH 2/2] fs: jbd2: use clear_and_wake_up_bit() in journal_end_buffer_io_sync() Agatha Isabelle Moreira
2026-05-22 13:14 ` [PATCH 0/2] fs: refactor code to use clear_and_wake_up_bit() Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox