target: fix compile failure in linux-next
Subsystems (2)
James Bottomley
maintainerPATCH 1/1 target: fix compile failure in linux-next
The interfaces open/close_bdev_exclusive are being eliminated in the merge window. Fix by using the replacements.
James
---
drivers/target/target_core_iblock.c +3 -3
@@ -152,8 +152,8 @@ static struct se_device *iblock_create_virtdevice(printk (KERN_INFO "IBLOCK: Claiming struct block_device: %s\n" , ib_dev->ibd_udev_path); - bd =open_bdev_exclusive (ib_dev->ibd_udev_path, -FMODE_WRITE |FMODE_READ , ib_dev); + bd =blkdev_get_by_path (ib_dev->ibd_udev_path, +FMODE_WRITE |FMODE_READ |FMODE_EXCL , ib_dev);if (!(bd)) goto failed;/*
@@ -220,7 +220,7 @@ static void iblock_free_device(void *p) {struct iblock_dev *ib_dev = p; -close_bdev_exclusive (ib_dev->ibd_bd,FMODE_WRITE |FMODE_READ ); +blkdev_put (ib_dev->ibd_bd,FMODE_WRITE |FMODE_READ |FMODE_EXCL );bioset_free (ib_dev->ibd_bio_set);kfree (ib_dev); }
drivers/target/target_core_pscsi.c +6 -6
@@ -460,10 +460,10 @@ static struct se_device *pscsi_create_type_disk(* Claim exclusive struct block_device access to struct scsi_device * for TYPE_DISK using supplied udev_path */ - bd =open_bdev_exclusive (se_dev->se_dev_udev_path, -FMODE_WRITE |FMODE_READ , pdv); + bd =blkdev_get_by_path (se_dev->se_dev_udev_path, +FMODE_WRITE |FMODE_READ |FMODE_EXCL , pdv);if (!(bd)) { -printk ("pSCSI: open_bdev_exclusive() failed\n" ); +printk ("pSCSI: blkdev_get_by_path() failed\n" );scsi_device_put (sd);return NULL ; }
@@ -471,7 +471,7 @@ static struct se_device *pscsi_create_type_disk( dev =pscsi_add_device_to_list (hba, se_dev, pdv, sd, dev_flags);if (!(dev)) { -close_bdev_exclusive (pdv->pdv_bd,FMODE_WRITE |FMODE_READ ); +blkdev_put (pdv->pdv_bd,FMODE_WRITE |FMODE_READ |FMODE_EXCL );scsi_device_put (sd);return NULL ; }
@@ -680,8 +680,8 @@ static void pscsi_free_device(void *p)* struct scsi_device with TYPE_DISK from pscsi_create_type_disk() */ if ((sd->type ==TYPE_DISK ) && pdv->pdv_bd) { -close_bdev_exclusive (pdv->pdv_bd, -FMODE_WRITE |FMODE_READ ); +blkdev_put (pdv->pdv_bd, +FMODE_WRITE |FMODE_READ |FMODE_EXCL ); pdv->pdv_bd =NULL ; }/*
Quoted 5 lines · James Bottomley
The interfaces open/close_bdev_exclusive are being eliminated in the merge window. Fix by using the replacements.
James
Hi James,
If you don't mind I am going to let srf carry this patch for now, and I will begin a 'for-linux-next' branch to prevent future breakage from drivers/target/.
Best Regards,
--nab
Quoted 66 lines
---
drivers/target/target_core_iblock.c +3
-3@@ -152,8 +152,8 @@ static struct se_device *iblock_create_virtdevice(printk (KERN_INFO "IBLOCK: Claiming struct block_device: %s\n" , ib_dev->ibd_udev_path); - bd =open_bdev_exclusive (ib_dev->ibd_udev_path, -FMODE_WRITE |FMODE_READ , ib_dev); + bd =blkdev_get_by_path (ib_dev->ibd_udev_path, +FMODE_WRITE |FMODE_READ |FMODE_EXCL , ib_dev);if (!(bd)) goto failed;/* @@ -220,7 +220,7 @@ static void iblock_free_device(void *p) {struct iblock_dev *ib_dev = p; -close_bdev_exclusive (ib_dev->ibd_bd,FMODE_WRITE |FMODE_READ ); +blkdev_put (ib_dev->ibd_bd,FMODE_WRITE |FMODE_READ |FMODE_EXCL );bioset_free (ib_dev->ibd_bio_set);kfree (ib_dev); }drivers/target/target_core_pscsi.c +6
-6@@ -460,10 +460,10 @@ static struct se_device *pscsi_create_type_disk(* Claim exclusive struct block_device access to struct scsi_device * for TYPE_DISK using supplied udev_path */ - bd =open_bdev_exclusive (se_dev->se_dev_udev_path, -FMODE_WRITE |FMODE_READ , pdv); + bd =blkdev_get_by_path (se_dev->se_dev_udev_path, +FMODE_WRITE |FMODE_READ |FMODE_EXCL , pdv);if (!(bd)) { -printk ("pSCSI: open_bdev_exclusive() failed\n" ); +printk ("pSCSI: blkdev_get_by_path() failed\n" );scsi_device_put (sd);return NULL ; }@@ -471,7 +471,7 @@ static struct se_device *pscsi_create_type_disk( dev =pscsi_add_device_to_list (hba, se_dev, pdv, sd, dev_flags);if (!(dev)) { -close_bdev_exclusive (pdv->pdv_bd,FMODE_WRITE |FMODE_READ ); +blkdev_put (pdv->pdv_bd,FMODE_WRITE |FMODE_READ |FMODE_EXCL );scsi_device_put (sd);return NULL ; }@@ -680,8 +680,8 @@ static void pscsi_free_device(void *p)* struct scsi_device with TYPE_DISK from pscsi_create_type_disk() */ if ((sd->type ==TYPE_DISK ) && pdv->pdv_bd) { -close_bdev_exclusive (pdv->pdv_bd, -FMODE_WRITE |FMODE_READ ); +blkdev_put (pdv->pdv_bd, +FMODE_WRITE |FMODE_READ |FMODE_EXCL ); pdv->pdv_bd =NULL ; }/*
James Bottomley
maintainerQuoted 4 lines · Nicholas A. Bellinger
Quoted 3 lines · James Bottomley
The interfaces open/close_bdev_exclusive are being eliminated in the merge window. Fix by using the replacements.
Quoted 8 lines
Quoted 2 lines
James
Hi James,
If you don't mind I am going to let srf carry this patch for now, and I will begin a 'for-linux-next' branch to prevent future breakage from
drivers/target/.
It's already done. The point about postmerge trees is to fix this type of thing.
James
Quoted 8 lines · James Bottomley
Quoted 7 lines · Nicholas A. Bellinger
Quoted 5 lines · James Bottomley
The interfaces open/close_bdev_exclusive are being eliminated in the merge window. Fix by using the replacements.
James
Quoted 9 lines
Quoted 5 lines
Hi James,
If you don't mind I am going to let srf carry this patch for now, and I will begin a 'for-linux-next' branch to prevent future breakage from
drivers/target/.It's already done. The point about postmerge trees is to fix this type of thing.
Ahhh, thanks for the clarification here. I will try my best to prevent this type of conflict for linux-next in the future.
Best Regards,
--nab