Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Agatha Isabelle Moreira <code@agatha.dev>
To: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	 shuo chen <1289151713@qq.com>, Theodore Ts'o <tytso@mit.edu>,
	 linux-kernel-mentees@lists.linux.dev, shuah@kernel.org,
	patch-reply@agatha.dev
Subject: [PATCH 0/2] fs: refactor code to use clear_and_wake_up_bit()
Date: Wed, 20 May 2026 16:45:35 -0300	[thread overview]
Message-ID: <ag4PEP52c8rxrYPc@guidai> (raw)

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


             reply	other threads:[~2026-05-20 19:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20 19:45 Agatha Isabelle Moreira [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ag4PEP52c8rxrYPc@guidai \
    --to=code@agatha.dev \
    --cc=1289151713@qq.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patch-reply@agatha.dev \
    --cc=shuah@kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox