aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 769f2c5d9e9e..6c523b3360f6 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -394,7 +394,7 @@ int btrfs_close_devices(struct btrfs_fs_devices *fs_devices)
394} 394}
395 395
396int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices, 396int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
397 int flags, void *holder) 397 fmode_t flags, void *holder)
398{ 398{
399 struct block_device *bdev; 399 struct block_device *bdev;
400 struct list_head *head = &fs_devices->devices; 400 struct list_head *head = &fs_devices->devices;
@@ -469,7 +469,7 @@ int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
469error_brelse: 469error_brelse:
470 brelse(bh); 470 brelse(bh);
471error_close: 471error_close:
472 close_bdev_exclusive(bdev, MS_RDONLY); 472 close_bdev_exclusive(bdev, FMODE_READ);
473error: 473error:
474 continue; 474 continue;
475 } 475 }
@@ -488,7 +488,7 @@ out:
488} 488}
489 489
490int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, 490int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
491 int flags, void *holder) 491 fmode_t flags, void *holder)
492{ 492{
493 int ret; 493 int ret;
494 494
@@ -507,7 +507,7 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
507 return ret; 507 return ret;
508} 508}
509 509
510int btrfs_scan_one_device(const char *path, int flags, void *holder, 510int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder,
511 struct btrfs_fs_devices **fs_devices_ret) 511 struct btrfs_fs_devices **fs_devices_ret)
512{ 512{
513 struct btrfs_super_block *disk_super; 513 struct btrfs_super_block *disk_super;
@@ -1008,7 +1008,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
1008 goto out; 1008 goto out;
1009 } 1009 }
1010 } else { 1010 } else {
1011 bdev = open_bdev_exclusive(device_path, MS_RDONLY, 1011 bdev = open_bdev_exclusive(device_path, FMODE_READ,
1012 root->fs_info->bdev_holder); 1012 root->fs_info->bdev_holder);
1013 if (IS_ERR(bdev)) { 1013 if (IS_ERR(bdev)) {
1014 ret = PTR_ERR(bdev); 1014 ret = PTR_ERR(bdev);
@@ -1078,7 +1078,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
1078 BUG_ON(device->writeable); 1078 BUG_ON(device->writeable);
1079 brelse(bh); 1079 brelse(bh);
1080 if (bdev) 1080 if (bdev)
1081 close_bdev_exclusive(bdev, MS_RDONLY); 1081 close_bdev_exclusive(bdev, FMODE_READ);
1082 1082
1083 if (device->bdev) { 1083 if (device->bdev) {
1084 close_bdev_exclusive(device->bdev, device->mode); 1084 close_bdev_exclusive(device->bdev, device->mode);
@@ -1121,7 +1121,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
1121 } 1121 }
1122 if (bdev) { 1122 if (bdev) {
1123 /* one close for us */ 1123 /* one close for us */
1124 close_bdev_exclusive(bdev, MS_RDONLY); 1124 close_bdev_exclusive(bdev, FMODE_READ);
1125 } 1125 }
1126 kfree(device->name); 1126 kfree(device->name);
1127 kfree(device); 1127 kfree(device);
@@ -1132,7 +1132,7 @@ error_brelse:
1132 brelse(bh); 1132 brelse(bh);
1133error_close: 1133error_close:
1134 if (bdev) 1134 if (bdev)
1135 close_bdev_exclusive(bdev, MS_RDONLY); 1135 close_bdev_exclusive(bdev, FMODE_READ);
1136out: 1136out:
1137 mutex_unlock(&root->fs_info->volume_mutex); 1137 mutex_unlock(&root->fs_info->volume_mutex);
1138 mutex_unlock(&uuid_mutex); 1138 mutex_unlock(&uuid_mutex);
@@ -2913,7 +2913,7 @@ static int open_seed_devices(struct btrfs_root *root, u8 *fsid)
2913 goto out; 2913 goto out;
2914 } 2914 }
2915 2915
2916 ret = __btrfs_open_devices(fs_devices, MS_RDONLY, 2916 ret = __btrfs_open_devices(fs_devices, FMODE_READ,
2917 root->fs_info->bdev_holder); 2917 root->fs_info->bdev_holder);
2918 if (ret) 2918 if (ret)
2919 goto out; 2919 goto out;