diff options
author | David Sterba <dsterba@suse.com> | 2019-01-23 18:07:14 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-02-25 14:13:28 +0100 |
commit | 766ece54f4c9c29b25eabd091a2ee939feb1669e (patch) | |
tree | e600cdb57da7810436ca26bfbc5b7be66925ecf6 /fs/btrfs/locking.h | |
parent | 970e74d961db61eed18e33d8ecd644ee8ef7da04 (diff) | |
download | lwn-766ece54f4c9c29b25eabd091a2ee939feb1669e.tar.gz lwn-766ece54f4c9c29b25eabd091a2ee939feb1669e.zip |
btrfs: merge btrfs_set_lock_blocking_rw with it's caller
The last caller that does not have a fixed value of lock is
btrfs_set_path_blocking, that actually does the same conditional swtich
by the lock type so we can merge the branches together and remove the
helper.
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/locking.h')
-rw-r--r-- | fs/btrfs/locking.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/btrfs/locking.h b/fs/btrfs/locking.h index 84ea6ed60047..595014f64830 100644 --- a/fs/btrfs/locking.h +++ b/fs/btrfs/locking.h @@ -39,16 +39,4 @@ static inline void btrfs_tree_unlock_rw(struct extent_buffer *eb, int rw) BUG(); } -/* - * If we currently have a spinning reader or writer lock (indicated by the rw - * flag) this will bump the count of blocking holders and drop the spinlock. - */ -static inline void btrfs_set_lock_blocking_rw(struct extent_buffer *eb, int rw) -{ - if (rw == BTRFS_WRITE_LOCK) - btrfs_set_lock_blocking_write(eb); - else if (rw == BTRFS_READ_LOCK) - btrfs_set_lock_blocking_read(eb); -} - #endif |