Skip to content

fs: refactor code to use clear_and_wake_up_bit()

Agatha Isabelle Moreira linux-ext4 linux-fsdevel linux-kernel-mentees lkml 1 version Applied

Status from this message: Applied to the vfs-7.2.misc branch of the vfs/vfs.git tree.

Get series with b4
b4 am ag4PEP52c8rxrYPc@guidai

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2fs: buffer: use clear_and_wake_up_bit() in unlock_buffer()fs/buffer.c+1 -31 reply
2/2fs: jbd2: use clear_and_wake_up_bit() in journal_end_buffer_io_sync()fs/jbd2/commit.c+1 -31 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJan Kara
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] fs: refactor code to use clear_and_wake_up_bit()

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.

---

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(-)
Signature · 1 line
2.53.0