aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_nl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index fd0346090289..650e43ba4f7c 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -902,8 +902,8 @@ static int drbd_nl_disk_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp
902 } 902 }
903 } 903 }
904 904
905 bdev = open_bdev_exclusive(nbc->dc.backing_dev, 905 bdev = blkdev_get_by_path(nbc->dc.backing_dev,
906 FMODE_READ | FMODE_WRITE, mdev); 906 FMODE_READ | FMODE_WRITE | FMODE_EXCL, mdev);
907 if (IS_ERR(bdev)) { 907 if (IS_ERR(bdev)) {
908 dev_err(DEV, "open(\"%s\") failed with %ld\n", nbc->dc.backing_dev, 908 dev_err(DEV, "open(\"%s\") failed with %ld\n", nbc->dc.backing_dev,
909 PTR_ERR(bdev)); 909 PTR_ERR(bdev));
@@ -920,10 +920,10 @@ static int drbd_nl_disk_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp
920 * should check it for you already; but if you don't, or 920 * should check it for you already; but if you don't, or
921 * someone fooled it, we need to double check here) 921 * someone fooled it, we need to double check here)
922 */ 922 */
923 bdev = open_bdev_exclusive(nbc->dc.meta_dev, 923 bdev = blkdev_get_by_path(nbc->dc.meta_dev,
924 FMODE_READ | FMODE_WRITE, 924 FMODE_READ | FMODE_WRITE | FMODE_EXCL,
925 (nbc->dc.meta_dev_idx < 0) ? 925 (nbc->dc.meta_dev_idx < 0) ?
926 (void *)mdev : (void *)drbd_m_holder); 926 (void *)mdev : (void *)drbd_m_holder);
927 if (IS_ERR(bdev)) { 927 if (IS_ERR(bdev)) {
928 dev_err(DEV, "open(\"%s\") failed with %ld\n", nbc->dc.meta_dev, 928 dev_err(DEV, "open(\"%s\") failed with %ld\n", nbc->dc.meta_dev,
929 PTR_ERR(bdev)); 929 PTR_ERR(bdev));