From: David Sterba Date: Tue, 8 Jul 2025 14:49:52 +0000 (+0200) Subject: btrfs: use clear_and_wake_up_bit() where open coded X-Git-Tag: block-6.17-20250808~77^2~23 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e8d2e254dc073f9a1ea2c00b53ba44f329828701;p=linux-block.git btrfs: use clear_and_wake_up_bit() where open coded There are two cases open coding the clear and wake up pattern, we can use the helper. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba --- diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index cc7f04d56a10..835b0deef9bb 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2060,10 +2060,7 @@ static void end_bbio_meta_write(struct btrfs_bio *bbio) } buffer_tree_clear_mark(eb, PAGECACHE_TAG_WRITEBACK); - clear_bit(EXTENT_BUFFER_WRITEBACK, &eb->bflags); - smp_mb__after_atomic(); - wake_up_bit(&eb->bflags, EXTENT_BUFFER_WRITEBACK); - + clear_and_wake_up_bit(EXTENT_BUFFER_WRITEBACK, &eb->bflags); bio_put(&bbio->bio); } @@ -3681,9 +3678,7 @@ void set_extent_buffer_uptodate(struct extent_buffer *eb) static void clear_extent_buffer_reading(struct extent_buffer *eb) { - clear_bit(EXTENT_BUFFER_READING, &eb->bflags); - smp_mb__after_atomic(); - wake_up_bit(&eb->bflags, EXTENT_BUFFER_READING); + clear_and_wake_up_bit(EXTENT_BUFFER_READING, &eb->bflags); } static void end_bbio_meta_read(struct btrfs_bio *bbio)