aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_device.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2012-03-20 21:26:48 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2012-04-14 16:04:58 -0700
commit58d926187758f76647d68e2f51ce44e6ace81873 (patch)
treec877294c394ab14cbdeca4af1a3e7835d644f73b /drivers/target/target_core_device.c
parentLinux 3.4-rc2 (diff)
downloadlinux-dev-58d926187758f76647d68e2f51ce44e6ace81873.tar.xz
linux-dev-58d926187758f76647d68e2f51ce44e6ace81873.zip
target: Remove obsolete DF_READ_ONLY usage
This was used at one time as a hack by FILEIO backend registration to allow a struct block_device that was claimed with blkdev_get (by a local filesystem mount for example) to be exported as read-only (SCSI WP=1). Since FILEIO backend registration will no longer attempt to obtain exclusive access to an underlying struct block_device here, this flag is now obsolete. Reported-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_device.c')
-rw-r--r--drivers/target/target_core_device.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index aa6267746383..d175ee260a06 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -1341,7 +1341,6 @@ struct se_lun *core_dev_add_lun(
u32 lun)
{
struct se_lun *lun_p;
- u32 lun_access = 0;
int rc;
if (atomic_read(&dev->dev_access_obj.obj_access_count) != 0) {
@@ -1354,12 +1353,8 @@ struct se_lun *core_dev_add_lun(
if (IS_ERR(lun_p))
return lun_p;
- if (dev->dev_flags & DF_READ_ONLY)
- lun_access = TRANSPORT_LUNFLAGS_READ_ONLY;
- else
- lun_access = TRANSPORT_LUNFLAGS_READ_WRITE;
-
- rc = core_tpg_post_addlun(tpg, lun_p, lun_access, dev);
+ rc = core_tpg_post_addlun(tpg, lun_p,
+ TRANSPORT_LUNFLAGS_READ_WRITE, dev);
if (rc < 0)
return ERR_PTR(rc);