]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: split btrfs_set_lock_blocking_rw to read and write helpers
authorDavid Sterba <dsterba@suse.com>
Tue, 3 Apr 2018 23:43:05 +0000 (01:43 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Feb 2019 13:13:27 +0000 (14:13 +0100)
commit718f21c61bb7012ba5655bb07273b390a6947dcf
tree6be675094acd2c61d2638c07e35b744567e273c6
parent30d28e2922126be633dc70577a0b2aa461983015
btrfs: split btrfs_set_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 but leave a helper that still takes the variable lock type to make
current code compile.  The call sites will be converted in followup
patches.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/locking.c
fs/btrfs/locking.h