summaryrefslogtreecommitdiff
path: root/fs/btrfs/dev-replace.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-03-24 02:11:38 +0100
committerDavid Sterba <dsterba@suse.com>2018-03-31 02:01:07 +0200
commit7e79cb86be28ed8073870c22f479b3b1293ecb85 (patch)
tree40473571871d71e5ab63bd4f6521882e92bd100e /fs/btrfs/dev-replace.h
parente7ab0af6c30f763e41a1206318d4756d270e93a0 (diff)
downloadlwn-7e79cb86be28ed8073870c22f479b3b1293ecb85.tar.gz
lwn-7e79cb86be28ed8073870c22f479b3b1293ecb85.zip
btrfs: split dev-replace locking helpers for read and write
The current calls are unclear in what way btrfs_dev_replace_lock takes the locks, so drop the argument, split the helpers and use similar naming as for read and write locks. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.h')
-rw-r--r--fs/btrfs/dev-replace.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/dev-replace.h b/fs/btrfs/dev-replace.h
index 389de365b0db..8566a02ef222 100644
--- a/fs/btrfs/dev-replace.h
+++ b/fs/btrfs/dev-replace.h
@@ -36,8 +36,10 @@ int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info);
void btrfs_dev_replace_suspend_for_unmount(struct btrfs_fs_info *fs_info);
int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info);
int btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace);
-void btrfs_dev_replace_lock(struct btrfs_dev_replace *dev_replace, int rw);
-void btrfs_dev_replace_unlock(struct btrfs_dev_replace *dev_replace, int rw);
+void btrfs_dev_replace_read_lock(struct btrfs_dev_replace *dev_replace);
+void btrfs_dev_replace_read_unlock(struct btrfs_dev_replace *dev_replace);
+void btrfs_dev_replace_write_lock(struct btrfs_dev_replace *dev_replace);
+void btrfs_dev_replace_write_unlock(struct btrfs_dev_replace *dev_replace);
void btrfs_dev_replace_set_lock_blocking(struct btrfs_dev_replace *dev_replace);
void btrfs_dev_replace_clear_lock_blocking(
struct btrfs_dev_replace *dev_replace);