btrfs: use clear_and_wake_up_bit() where open coded
David Sterba
maintainerPATCH 1/1 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.
Signed-off-by David Sterba <[email protected]>
--- fs/btrfs/extent_io.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
fs/btrfs/extent_io.c +2 -7
@@ -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); }
@@ -3682,9 +3679,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)
Signature · 1 line
2.49.0
A quick grep showed no more pure wake_up_bit() calls just clear_and_wake_up_bit() in btrfs.
Looks good,
Reviewed-by Johannes Thumshirn <[email protected]>