From aa12c02778a9719283fc3c32cfe5cffb902a7685 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 4 Apr 2018 01:52:31 +0200 Subject: btrfs: split btrfs_clear_lock_blocking_rw to read and write helpers There are many callers that hardcode the desired lock type so we can avoid the switch and call them directly. Split the current function to two. There are no remaining users of btrfs_clear_lock_blocking_rw so it's removed. The call sites will be converted in followup patches. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba --- fs/btrfs/locking.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'fs/btrfs/locking.h') diff --git a/fs/btrfs/locking.h b/fs/btrfs/locking.h index 0453a4797693..3f81d6900c71 100644 --- a/fs/btrfs/locking.h +++ b/fs/btrfs/locking.h @@ -19,7 +19,8 @@ void btrfs_tree_read_unlock(struct extent_buffer *eb); void btrfs_tree_read_unlock_blocking(struct extent_buffer *eb); void btrfs_set_lock_blocking_read(struct extent_buffer *eb); void btrfs_set_lock_blocking_write(struct extent_buffer *eb); -void btrfs_clear_lock_blocking_rw(struct extent_buffer *eb, int rw); +void btrfs_clear_lock_blocking_read(struct extent_buffer *eb); +void btrfs_clear_lock_blocking_write(struct extent_buffer *eb); void btrfs_assert_tree_locked(struct extent_buffer *eb); int btrfs_try_tree_read_lock(struct extent_buffer *eb); int btrfs_try_tree_write_lock(struct extent_buffer *eb); @@ -55,8 +56,4 @@ static inline void btrfs_set_lock_blocking(struct extent_buffer *eb) btrfs_set_lock_blocking_rw(eb, BTRFS_WRITE_LOCK); } -static inline void btrfs_clear_lock_blocking(struct extent_buffer *eb) -{ - btrfs_clear_lock_blocking_rw(eb, BTRFS_WRITE_LOCK_BLOCKING); -} #endif -- cgit v1.2.3-73-gaa49b