diff options
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index d39596224d21..f1b729d3b883 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -489,7 +489,7 @@ again: | |||
489 | continue; | 489 | continue; |
490 | 490 | ||
491 | if (device->bdev) { | 491 | if (device->bdev) { |
492 | close_bdev_exclusive(device->bdev, device->mode); | 492 | blkdev_put(device->bdev, device->mode | FMODE_EXCL); |
493 | device->bdev = NULL; | 493 | device->bdev = NULL; |
494 | fs_devices->open_devices--; | 494 | fs_devices->open_devices--; |
495 | } | 495 | } |
@@ -523,7 +523,7 @@ static int __btrfs_close_devices(struct btrfs_fs_devices *fs_devices) | |||
523 | 523 | ||
524 | list_for_each_entry(device, &fs_devices->devices, dev_list) { | 524 | list_for_each_entry(device, &fs_devices->devices, dev_list) { |
525 | if (device->bdev) { | 525 | if (device->bdev) { |
526 | close_bdev_exclusive(device->bdev, device->mode); | 526 | blkdev_put(device->bdev, device->mode | FMODE_EXCL); |
527 | fs_devices->open_devices--; | 527 | fs_devices->open_devices--; |
528 | } | 528 | } |
529 | if (device->writeable) { | 529 | if (device->writeable) { |
@@ -638,7 +638,7 @@ static int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices, | |||
638 | error_brelse: | 638 | error_brelse: |
639 | brelse(bh); | 639 | brelse(bh); |
640 | error_close: | 640 | error_close: |
641 | close_bdev_exclusive(bdev, flags); | 641 | blkdev_put(bdev, flags | FMODE_EXCL); |
642 | error: | 642 | error: |
643 | continue; | 643 | continue; |
644 | } | 644 | } |
@@ -716,7 +716,7 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, | |||
716 | 716 | ||
717 | brelse(bh); | 717 | brelse(bh); |
718 | error_close: | 718 | error_close: |
719 | close_bdev_exclusive(bdev, flags); | 719 | blkdev_put(bdev, flags | FMODE_EXCL); |
720 | error: | 720 | error: |
721 | mutex_unlock(&uuid_mutex); | 721 | mutex_unlock(&uuid_mutex); |
722 | return ret; | 722 | return ret; |
@@ -1244,7 +1244,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path) | |||
1244 | root->fs_info->fs_devices->latest_bdev = next_device->bdev; | 1244 | root->fs_info->fs_devices->latest_bdev = next_device->bdev; |
1245 | 1245 | ||
1246 | if (device->bdev) { | 1246 | if (device->bdev) { |
1247 | close_bdev_exclusive(device->bdev, device->mode); | 1247 | blkdev_put(device->bdev, device->mode | FMODE_EXCL); |
1248 | device->bdev = NULL; | 1248 | device->bdev = NULL; |
1249 | device->fs_devices->open_devices--; | 1249 | device->fs_devices->open_devices--; |
1250 | } | 1250 | } |
@@ -1287,7 +1287,7 @@ error_brelse: | |||
1287 | brelse(bh); | 1287 | brelse(bh); |
1288 | error_close: | 1288 | error_close: |
1289 | if (bdev) | 1289 | if (bdev) |
1290 | close_bdev_exclusive(bdev, FMODE_READ); | 1290 | blkdev_put(bdev, FMODE_READ | FMODE_EXCL); |
1291 | out: | 1291 | out: |
1292 | mutex_unlock(&root->fs_info->volume_mutex); | 1292 | mutex_unlock(&root->fs_info->volume_mutex); |
1293 | mutex_unlock(&uuid_mutex); | 1293 | mutex_unlock(&uuid_mutex); |
@@ -1565,7 +1565,7 @@ out: | |||
1565 | mutex_unlock(&root->fs_info->volume_mutex); | 1565 | mutex_unlock(&root->fs_info->volume_mutex); |
1566 | return ret; | 1566 | return ret; |
1567 | error: | 1567 | error: |
1568 | close_bdev_exclusive(bdev, 0); | 1568 | blkdev_put(bdev, FMODE_EXCL); |
1569 | if (seeding_dev) { | 1569 | if (seeding_dev) { |
1570 | mutex_unlock(&uuid_mutex); | 1570 | mutex_unlock(&uuid_mutex); |
1571 | up_write(&sb->s_umount); | 1571 | up_write(&sb->s_umount); |